/* Green Eye Creative brand layer for AYRT.
   Loaded after each page's own styles. Palette and fonts are the brand's:
   gold #C9A84C, gold-light #E8C97A, Cormorant Garamond and Syne.
   Fonts are served from this site, so student pages make no outside calls. */

@font-face {
    font-family: 'Cormorant Garamond';
    src: url('fonts/cormorant-garamond-latin-500-normal.woff2') format('woff2');
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: 'Cormorant Garamond';
    src: url('fonts/cormorant-garamond-latin-600-normal.woff2') format('woff2');
    font-weight: 600;
    font-display: swap;
}

@font-face {
    font-family: 'Syne';
    src: url('fonts/syne-latin-400-normal.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Syne';
    src: url('fonts/syne-latin-600-normal.woff2') format('woff2');
    font-weight: 600;
    font-display: swap;
}

@font-face {
    font-family: 'Syne';
    src: url('fonts/syne-latin-700-normal.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}

:root {
    --gold: #C9A84C;
    --gold-light: #E8C97A;
    --ink: #0F0F0D;
    --paper: #EBE4D3;
    --surface: #F8F3E7;
    --line: #D9CFBA;
    --muted: #625C53;
    --chip: #E3DAC6;
}

html {
    background: var(--paper);
}

/* Thin gold line across the top of every page */
html body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gold);
    z-index: 10;
}

html body {
    background: var(--paper);
    color: var(--ink);
    font-family: 'Syne', -apple-system, 'Segoe UI', sans-serif;
    font-variant-numeric: lining-nums;
}

/* Headings */
html body h1 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    font-size: 34px;
    line-height: 1.1;
    color: var(--ink);
    letter-spacing: 0;
}

html body h2 {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink);
}

html body .subtitle,
html body .meta,
html body .hint,
html body .stat-label,
html body .session-id,
html body .link,
html body .cert-label,
html body .empty {
    color: var(--muted);
}

/* Surfaces */
html body .card,
html body .stat,
html body .prompt,
html body #certificate,
html body #fullscreen-gate {
    background: var(--surface);
    border-color: var(--line);
}

html body .prompt,
html body #progress-card {
    border-left: 3px solid var(--gold);
}

/* Progress card shown to the student after submit */
html body #progress-card {
    background: var(--surface);
    border-color: var(--line);
    border-left-color: var(--gold);
}

html body #progress-message,
html body #progress-growth {
    color: var(--ink);
}

html body #progress-note {
    color: var(--muted);
}

html body #fullscreen-gate {
    border: 1px solid var(--ink);
}

html body .stat-value {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    font-size: 30px;
    color: var(--ink);
}

html body .stat.danger .stat-value {
    color: #C0392B;
}

/* Fields */
html body input[type="text"],
html body input[type="email"],
html body input[type="password"],
html body textarea {
    background: var(--surface);
    border-color: var(--line);
    color: var(--ink);
    font-family: inherit;
}

html body input:focus,
html body textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.22);
}

/* Writing box: plain sans-serif with extra line and letter spacing on a
   soft off-white, for reading comfort (including dyslexic writers). */
html body #editor {
    font-family: -apple-system, 'Segoe UI', Verdana, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.8;
    letter-spacing: .01em;
    color: #1E1C18;
    background: var(--surface);
}

html body #editor.flagged {
    border-color: #C0392B;
    background: #FFF6F3;
}

html body #editor[readonly] {
    background: #E3DAC6;
    color: var(--muted);
}

/* Buttons: dark with gold lettering */
html body button,
html body .btn,
html body a.enter {
    background: var(--ink);
    color: var(--gold-light);
    font-family: 'Syne', sans-serif;
    font-weight: 600;
    letter-spacing: 0.02em;
    border: 1px solid var(--ink);
}

html body button:hover,
html body .btn:hover,
html body a.enter:hover {
    background: #2A2924;
    color: var(--gold-light);
}

html body button:disabled {
    background: #B9B2A4;
    border-color: #B9B2A4;
    color: var(--surface);
    cursor: not-allowed;
}

/* Tabs on the teacher login */
html body .tab {
    background: var(--surface);
    color: var(--muted);
}

html body .tab.active {
    background: var(--ink);
    color: var(--gold-light);
}

/* Small pieces */
html body .code,
html body .code-box {
    background: var(--chip);
    color: var(--ink);
}

html body .logout {
    color: var(--muted);
}

html body table.subs th {
    color: var(--muted);
    border-bottom-color: var(--line);
}

html body table.subs td {
    border-bottom-color: #EEE7D8;
    color: var(--ink);
}

html body label {
    color: var(--ink);
}

/* Teacher table: let long headers wrap so every column fits */
html body table.subs {
    font-size: 12.5px;
}

html body table.subs th,
html body table.subs th.num {
    white-space: normal;
    letter-spacing: 0.03em;
    line-height: 1.25;
    padding: 6px 8px;
    vertical-align: bottom;
}

html body table.subs td {
    padding: 10px 8px;
}

/* The green "Let them retry" button keeps its own color */
html body button[style*="27ae60"] {
    color: #fff;
    border-color: #27ae60;
}
