/* RomansCode Installer — Stylesheet
 * Matches the romanscode.com design language:
 * cream paper background, near-black ink, orange accent, mono + serif type.
 * No !important. Single @media block at end. No duplicate rules.
 */

:root {
    --bg:           #f4f1ea;
    --bg-alt:       #ebe7dc;
    --ink:          #0a0a0a;
    --muted:        #5a5a5a;
    --line:         #d8d3c4;
    --accent:       #ff4a1c;
    --accent-soft:  #ffe8df;
    --success:      #2d7a4e;
    --success-soft: #d8edd9;
    --warn:         #a16207;
    --warn-soft:    #fef2d6;
    --error:        #b91c1c;
    --error-soft:   #fde2e2;
    --radius:       4px;
    --mono:         'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
    --serif:        'Fraunces', Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--mono);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--ink); }

code {
    font-family: var(--mono);
    font-size: 0.92em;
    background: var(--bg-alt);
    padding: 1px 6px;
    border-radius: 3px;
}

/* ---------- Layout ---------- */

.rc-shell {
    max-width: 760px;
    margin: 0 auto;
    padding: 48px 32px 64px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ---------- Header ---------- */

.rc-header {
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
}
.rc-brand {
    display: flex;
    align-items: baseline;
    gap: 14px;
}
.rc-logo {
    display: inline-block;
    position: relative;
    font-family: var(--serif);
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1;
    color: var(--ink);
    text-decoration: none;
    padding-bottom: 6px;
}

.rc-logo::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 24px;
    height: 3px;
    background: var(--accent);
}

.rc-logo:hover { color: var(--ink); }

/* When an SVG file is present, hide the text accent bar and show the image */
.rc-logo.is-image {
    padding-bottom: 0;
}
.rc-logo.is-image::after { display: none; }
.rc-logo.is-image img {
    display: block;
    height: 36px;
    width: auto;
}
.rc-sub {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

/* ---------- Progress bar ---------- */

.rc-progress { margin-bottom: 40px; }

.rc-progress ol {
    list-style: none;
    display: flex;
    gap: 8px;
}

.rc-progress li {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: transparent;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.rc-progress li.is-current {
    color: var(--ink);
    border-color: var(--ink);
    background: var(--bg);
}

.rc-progress li.is-done {
    color: var(--ink);
    border-color: var(--accent);
}

.rc-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-alt);
    color: var(--muted);
    font-family: var(--mono);
    font-weight: 600;
    font-size: 11px;
    border: 1px solid var(--line);
}

.rc-progress li.is-current .rc-step-num {
    background: var(--ink);
    color: var(--bg);
    border-color: var(--ink);
}

.rc-progress li.is-done .rc-step-num {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
}

/* ---------- Main content ---------- */

.rc-main { flex: 1; }

.rc-main h1 {
    font-family: var(--serif);
    font-size: 40px;
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--ink);
    margin-bottom: 12px;
}

.rc-main h1 em {
    font-style: italic;
    color: var(--accent);
    font-weight: 600;
}

.rc-main h2 {
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin: 28px 0 12px;
}

.rc-main p {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.65;
    margin-bottom: 24px;
    max-width: 600px;
}

.rc-main p strong { color: var(--ink); font-weight: 500; }

/* ---------- Cards ---------- */

.rc-card {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 20px;
}

/* ---------- Forms ---------- */

.rc-field { margin-bottom: 20px; }

.rc-field label {
    display: block;
    margin-bottom: 8px;
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 500;
    color: var(--ink);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.rc-field .rc-hint {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--muted);
    margin-top: 6px;
    line-height: 1.5;
}

.rc-field .rc-hint code {
    font-size: 0.95em;
    background: var(--bg-alt);
}

.rc-field input[type="text"],
.rc-field input[type="email"],
.rc-field input[type="password"],
.rc-field input[type="number"],
.rc-field input[type="url"],
.rc-field select {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-family: var(--mono);
    font-size: 14px;
    transition: border-color .15s;
}

.rc-field input:focus,
.rc-field select:focus {
    outline: none;
    border-color: var(--ink);
}

.rc-row {
    display: flex;
    gap: 16px;
}
.rc-row > .rc-field { flex: 1; }

/* Inline-prefix input — for fields where the URL prefix is shown as a non-editable label
   attached to the left of the input (e.g. example.com/[your-slug]). */
.rc-input-prefix {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg);
    transition: border-color .15s;
}
.rc-input-prefix:focus-within { border-color: var(--ink); }

.rc-input-prefix-text {
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    background: var(--bg-alt);
    color: var(--muted);
    font-family: var(--mono);
    font-size: 13px;
    border-right: 1px solid var(--line);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%;
}

.rc-input-prefix input {
    flex: 1;
    min-width: 0;
    padding: 11px 14px;
    background: transparent;
    color: var(--ink);
    border: none;
    font-family: var(--mono);
    font-size: 14px;
}
.rc-input-prefix input:focus { outline: none; }
.rc-input-prefix input::placeholder { color: var(--muted); opacity: 0.6; }

/* ---------- Buttons ---------- */

.rc-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
}

.rc-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 22px;
    border: 1px solid var(--ink);
    border-radius: var(--radius);
    background: transparent;
    color: var(--ink);
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, color .15s, transform .15s;
}

.rc-btn:hover {
    background: var(--ink);
    color: var(--bg);
}

.rc-btn-primary {
    background: var(--ink);
    color: var(--bg);
    border-color: var(--ink);
}

.rc-btn-primary:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
    transform: translateY(-1px);
}

/* ---------- Status badges ---------- */

.rc-checks {
    list-style: none;
}

.rc-ordered {
    margin: 12px 0 8px 20px;
    padding: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.8;
}
.rc-ordered li { margin-bottom: 4px; }
.rc-ordered code {
    font-size: 0.95em;
    background: var(--bg-alt);
}

.rc-checks li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
}

.rc-checks li:last-child { border-bottom: none; }

.rc-checks li strong {
    color: var(--ink);
    font-weight: 500;
    font-family: var(--mono);
}

.rc-checks .rc-hint {
    margin-top: 2px;
    margin-bottom: 0;
}

.rc-status {
    flex-shrink: 0;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: var(--radius);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.rc-status.is-ok    { background: var(--success-soft); color: var(--success); }
.rc-status.is-fail  { background: var(--error-soft);   color: var(--error); }
.rc-status.is-warn  { background: var(--warn-soft);    color: var(--warn); }

/* ---------- Errors ---------- */

.rc-errors {
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    border-left: 3px solid var(--accent);
    color: var(--ink);
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    font-size: 13px;
}

.rc-errors p {
    color: var(--ink);
    margin: 0;
    max-width: none;
}

.rc-errors p + p { margin-top: 8px; }

/* ---------- Footer ---------- */

.rc-footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.rc-footer-badge {
    display: inline-block;
    line-height: 0;
    opacity: 0.85;
    transition: opacity .15s, transform .15s;
}
.rc-footer-badge:hover {
    opacity: 1;
    transform: translateY(-1px);
}
.rc-footer-badge img {
    display: block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.rc-footer p {
    font-family: var(--mono);
    color: var(--muted);
    font-size: 12px;
    margin: 0;
    max-width: none;
    text-align: center;
}

.rc-footer a { color: var(--muted); }
.rc-footer a:hover { color: var(--accent); }

/* ---------- Mobile ---------- */

@media (max-width: 640px) {
    .rc-shell { padding: 24px 18px 40px; }
    .rc-header { margin-bottom: 28px; padding-bottom: 18px; }
    .rc-logo { font-size: 22px; }
    .rc-logo::after { width: 20px; height: 2px; }
    .rc-logo.is-image img { height: 30px; }
    .rc-footer-badge img { width: 28px; height: 28px; }
    .rc-main h1 { font-size: 30px; }
    .rc-main h2 { font-size: 16px; }
    .rc-card { padding: 20px; }
    .rc-progress { margin-bottom: 28px; }
    .rc-progress ol { gap: 4px; }
    .rc-progress li { padding: 8px 3px; gap: 4px; font-size: 9px; }
    .rc-step-num { width: 20px; height: 20px; font-size: 10px; }
    .rc-step-label { display: none; }
    .rc-row { flex-direction: column; gap: 0; }
    .rc-input-prefix-text { font-size: 11px; padding: 0 10px; max-width: 50%; }
    .rc-input-prefix input { font-size: 13px; padding: 10px 10px; }
    .rc-actions { flex-direction: column-reverse; align-items: stretch; }
    .rc-actions .rc-btn { justify-content: center; }
    .rc-checks li { flex-direction: column; align-items: flex-start; gap: 8px; }
}
