/* ==========================================================
   RIZES HUB — Stylesheet
   Design language: Aegean sea + Cycladic limestone + terracotta
   pottery + an inscribed Greek key (meander) as the signature
   structural motif. Deliberately NOT a literal blue/white flag
   pastiche — the Greek-ness comes from materials (marble,
   clay, the meander), not stripes.
   ========================================================== */

:root {
    /* ---- Color tokens ---- */
    --ink:            #1C2B33;   /* primary text */
    --ink-soft:       #45565E;   /* secondary text */
    --marble:         #FAF6EF;   /* page background — warm limestone, not stark white */
    --marble-deep:    #F1EADC;   /* card / panel background */
    --aegean:         #1B5E73;   /* primary brand colour — Aegean sea blue */
    --aegean-deep:    #123C49;   /* header bg, hover states */
    --aegean-tint:    #E7F0F1;   /* very light blue tint for subtle panels */
    --terracotta:     #C1542E;   /* signature accent — pottery clay */
    --terracotta-deep:#9C3F20;
    --olive:          #76874A;   /* secondary accent — olive branch */
    --gold:           #B8893E;   /* fine-line accent, rules, small icons */
    --line:           #DDD3C2;   /* hairline borders on the marble bg */
    --shadow:         0 12px 28px -10px rgba(18, 41, 51, 0.25);

    /* ---- Type tokens ---- */
    --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
    --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    /* ---- Layout tokens ---- */
    --max-width: 1180px;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

/* ---------------------------------------------------------
   Reset & base
   --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--marble);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a {
    color: var(--aegean);
    text-decoration: none;
}
a:hover { color: var(--terracotta); }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--ink);
    line-height: 1.15;
    margin: 0 0 0.5em;
    font-weight: 600;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 600; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
h3 { font-size: 1.4rem; }

p { margin: 0 0 1em; color: var(--ink-soft); }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Visible keyboard focus everywhere — accessibility floor */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--terracotta);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------------------------------------------------------
   Signature motif: the meander (Greek key) rule
   A thin repeating border used to divide major sections —
   the one place the design "announces" itself as Greek.
   --------------------------------------------------------- */
.meander-rule {
    width: 100%;
    height: 14px;
    background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='14' viewBox='0 0 56 14'%3E%3Cpath d='M0 1 H13 V13 H27 V5 H20 V9 H41 V1 H56' fill='none' stroke='%23B8893E' stroke-width='2'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-size: 56px 14px;
    opacity: 0.9;
}
.meander-rule--inverse {
    background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='14' viewBox='0 0 56 14'%3E%3Cpath d='M0 1 H13 V13 H27 V5 H20 V9 H41 V1 H56' fill='none' stroke='%23F1EADC' stroke-width='2'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------
   Site header / nav
   --------------------------------------------------------- */
.site-header {
    background: var(--aegean-deep);
    color: var(--marble);
    position: sticky;
    top: 0;
    z-index: 50;
}

.site-header__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 24px;
    max-width: 1500px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--marble);
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}
.brand:hover { color: var(--marble); }
.brand__mark-icon {
    width: 22px;
    height: 22px;
    flex: none;
    color: var(--terracotta);
}
.brand__sub {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #B9CBCF;
    align-self: center;
    padding-left: 8px;
    border-left: 1px solid rgba(255,255,255,0.2);
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    gap: 2px;
    flex-wrap: nowrap;
    min-width: 0;
}

.main-nav__link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #DCE7E9;
    font-weight: 500;
    font-size: 0.92rem;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    transition: background-color 0.15s ease, color 0.15s ease;
}
.main-nav__link:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}
.main-nav__link.is-active {
    background: var(--terracotta);
    color: #fff;
}
.main-nav__icon { width: 18px; height: 18px; flex: none; }

/* ---- Dropdown mega-menu items ---- */
.nav-item { position: relative; display: flex; align-items: center; }
.main-nav__dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--gold);
    flex: none;
}
.main-nav__chevron {
    width: 14px; height: 14px; flex: none;
    transition: transform 0.15s ease;
}
.nav-item.has-dropdown:hover .main-nav__chevron,
.nav-item.has-dropdown:focus-within .main-nav__chevron {
    transform: rotate(180deg);
}
.nav-sep {
    width: 18px;
    height: 1px;
    flex: none;
    background-image: repeating-linear-gradient(to right, rgba(255,255,255,0.28) 0 4px, transparent 4px 8px);
    margin: 0 2px;
}

.nav-dropdown {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    background: #fff;
    color: var(--ink);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
    min-width: 250px;
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    z-index: 60;
}
.nav-item.has-dropdown:hover .nav-dropdown,
.nav-item.has-dropdown:focus-within .nav-dropdown,
.nav-item.has-dropdown.is-open .nav-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}
.nav-dropdown__list { list-style: none; margin: 0; padding: 0; }
.nav-dropdown__list a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-weight: 500;
    font-size: 0.92rem;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
}
.nav-dropdown__list a:hover { background: var(--aegean-tint); color: var(--aegean-deep); }
.nav-dropdown__bullet {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--gold);
    flex: none;
}
.nav-dropdown__explore {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 6px;
    padding: 12px;
    border-top: 1px solid var(--line);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--terracotta);
}
.nav-dropdown__explore:hover { color: var(--terracotta-deep); }
.nav-dropdown__explore svg { width: 16px; height: 16px; flex: none; }

/* ---------------------------------------------------------
   Category page layout: sidebar + article
   --------------------------------------------------------- */
.page-layout {
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: 48px;
    align-items: start;
    padding: 56px 0 100px;
}
.learn-sidebar {
    position: sticky;
    top: 96px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 22px;
}
.learn-sidebar h4 {
    font-family: var(--font-body);
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--olive);
    margin-bottom: 14px;
}
.learn-sidebar h4:not(:first-child) {
    margin-top: 6px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}
.learn-sidebar ul { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.learn-sidebar ul:last-child { margin-bottom: 0; }
.learn-sidebar a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--ink-soft);
    font-weight: 500;
    font-size: 0.94rem;
}
.learn-sidebar a:hover { background: var(--aegean-tint); color: var(--aegean-deep); }
.learn-sidebar a.is-active { background: var(--aegean); color: #fff; }
.learn-sidebar a.is-active:hover { color: #fff; }
.learn-sidebar__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); flex: none; }

.page-article h2 { margin-top: 2.2em; }
.page-article h2:first-child { margin-top: 0; }
.page-article h3 { margin-top: 1.6em; color: var(--aegean-deep); }
.page-article ul, .page-article ol { color: var(--ink-soft); padding-left: 1.3em; margin: 0 0 1.2em; }
.page-article li { margin-bottom: 0.5em; }
.page-article table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: 0.94rem; }
.page-article th, .page-article td { text-align: left; padding: 10px 14px; border: 1px solid var(--line); }
.page-article th { background: var(--marble-deep); font-family: var(--font-body); font-weight: 700; }
.page-article blockquote {
    margin: 1.8em 0;
    padding: 18px 22px;
    background: var(--aegean-tint);
    border-left: 4px solid var(--aegean);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--ink);
}
.page-article blockquote p:last-child { margin-bottom: 0; }
.greek { font-weight: 600; color: var(--aegean-deep); }

.tts-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    margin-left: 2px;
    border: none;
    background: none;
    color: var(--terracotta, #C1542E);
    opacity: 0.55;
    cursor: pointer;
    vertical-align: middle;
    transform: translateY(-1px);
}
.tts-btn svg { width: 14px; height: 14px; }
.tts-btn:hover { opacity: 1; }
.tts-btn.is-loading {
    opacity: 0.8;
    animation: tts-pulse 0.9s ease-in-out infinite;
}
.tts-btn.is-playing { opacity: 1; color: var(--aegean-deep); }
@keyframes tts-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.page-hero {
    background: linear-gradient(180deg, var(--aegean-deep) 0%, var(--aegean) 100%);
    color: var(--marble);
    padding: 56px 0 84px;
}
.page-hero__eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
    padding: 5px 14px;
    border-radius: 999px;
    margin-bottom: 16px;
}
.page-hero h1 { color: #fff; margin-bottom: 10px; }
.page-hero p { color: #D8E5E7; max-width: 640px; font-size: 1.05rem; margin: 0; }

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 32px;
    padding: 0 8px;
    border-radius: 999px;
    border: 1.5px solid rgba(255,255,255,0.35);
    color: var(--marble);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}
.lang-switch:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--marble);
    cursor: pointer;
    padding: 8px;
}
.nav-toggle svg { width: 26px; height: 26px; }

/* ---------------------------------------------------------
   Buttons
   --------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 11px 22px;
    border-radius: var(--radius-sm);
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: transform 0.12s ease, background-color 0.15s ease, color 0.15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
    background: var(--terracotta);
    color: #fff;
}
.btn--primary:hover { background: var(--terracotta-deep); color: #fff; }

.btn--ghost {
    background: transparent;
    border-color: rgba(255,255,255,0.35);
    color: var(--marble);
}
.btn--ghost:hover { background: rgba(255,255,255,0.1); color: #fff; }

.btn--outline {
    background: transparent;
    border-color: var(--aegean);
    color: var(--aegean);
}
.btn--outline:hover { background: var(--aegean); color: #fff; }

/* ---------------------------------------------------------
   Hero
   --------------------------------------------------------- */
.hero {
    position: relative;
    background: linear-gradient(180deg, var(--aegean-deep) 0%, var(--aegean) 100%);
    color: var(--marble);
    overflow: hidden;
}
.hero::after {
    /* a soft horizon / wave line nodding to the Aegean coastline */
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 90px;
    background: var(--marble);
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    transform: scaleX(1.4);
}
.hero__inner {
    position: relative;
    z-index: 2;
    padding: 96px 24px 140px;
    text-align: center;
    max-width: 760px;
    margin: 0 auto;
}
.hero__eyebrow {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.8rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
    padding: 6px 16px;
    border-radius: 999px;
    margin-bottom: 22px;
}
.hero h1 { color: #fff; }
.hero h1 em {
    font-style: normal;
    color: var(--terracotta);
}
.hero p {
    color: #D8E5E7;
    font-size: 1.15rem;
    max-width: 580px;
    margin: 0 auto 32px;
}
.hero__actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---------------------------------------------------------
   Section nav cards (Learn / Travel / Exams / Study&Work)
   --------------------------------------------------------- */
.section-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: -84px;
    position: relative;
    z-index: 3;
}

.section-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.section-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 34px -12px rgba(18, 41, 51, 0.3);
}
.section-card__icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--aegean-tint);
    color: var(--aegean);
    margin-bottom: 18px;
}
.section-card__icon svg { width: 22px; height: 22px; }
.section-card h3 { margin-bottom: 6px; font-size: 1.2rem; }
.section-card p { font-size: 0.92rem; margin-bottom: 14px; }
.section-card__link {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--terracotta);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ---------------------------------------------------------
   Generic content sections
   --------------------------------------------------------- */
.section {
    padding: 100px 0 90px;
}
.section--tint {
    background: var(--marble-deep);
}
.section__head {
    text-align: center;
    max-width: 620px;
    margin: 0 auto 56px;
}
.section__eyebrow {
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--olive);
    font-weight: 700;
    margin-bottom: 10px;
    display: block;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
.feature {
    padding: 6px;
}
.feature__num {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--gold);
    border: 1px solid var(--gold);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

/* ---------------------------------------------------------
   Placeholder / "coming soon" panel — used by stub pages
   --------------------------------------------------------- */
.placeholder-panel {
    border: 1.5px dashed var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
    padding: 64px 32px;
    text-align: center;
    color: var(--ink-soft);
}
.placeholder-panel h2 { margin-bottom: 10px; }

/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */
.site-footer {
    background: var(--aegean-deep);
    color: #C9D9DB;
}
.site-footer__top {
    padding: 64px 0 40px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}
.site-footer .brand { margin-bottom: 14px; }
.site-footer p { color: #A9C0C3; font-size: 0.92rem; }
.footer-col h4 {
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 16px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: #C9D9DB; font-size: 0.92rem; }
.footer-col a:hover { color: #fff; }
.site-footer__bottom {
    border-top: 1px solid rgba(255,255,255,0.12);
    padding: 22px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #93AAAD;
    flex-wrap: wrap;
    gap: 12px;
}

/* ---------------------------------------------------------
   Learn Greek hub — route diagram
   --------------------------------------------------------- */
.route-map {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: center;
    padding: 40px 0 90px;
}
.route-map__copy h2 { margin-bottom: 14px; }
.route-map__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }
.route-map__svg { width: 100%; height: auto; }
.route-node__label {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.85rem;
    fill: var(--ink);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
.category-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 26px 22px;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.category-card__num {
    font-family: var(--font-display);
    color: var(--gold);
    font-size: 0.9rem;
    width: 32px; height: 32px;
    border: 1px solid var(--gold);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 16px;
}
.category-card h3 { margin-bottom: 8px; font-size: 1.15rem; }
.category-card p { font-size: 0.92rem; margin-bottom: 14px; }
.category-card a { font-weight: 700; font-size: 0.88rem; color: var(--terracotta); }

@media (max-width: 980px) {
    .route-map { grid-template-columns: 1fr; }
    .category-grid { grid-template-columns: repeat(2, 1fr); }
    .page-layout { grid-template-columns: 1fr; }
    .learn-sidebar { position: static; }
}

@media (max-width: 760px) {
    .category-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------
   Newsletter modal
   --------------------------------------------------------- */
.newsletter-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.newsletter-modal[hidden] { display: none; }
.newsletter-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 30, 32, 0.55);
}
.newsletter-modal__card {
    position: relative;
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 40px 32px 32px;
    max-width: 420px;
    width: 100%;
    box-shadow: var(--shadow);
    text-align: center;
}
.newsletter-modal__card h3 { margin: 10px 0 10px; font-size: 1.4rem; }
.newsletter-modal__card p { margin-bottom: 20px; }
.newsletter-modal__close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    color: var(--ink-soft);
    cursor: pointer;
    padding: 6px;
}
.newsletter-modal__close:hover { color: var(--ink); }
.newsletter-modal__dismiss {
    background: none;
    border: none;
    color: var(--ink-soft);
    font-size: 0.85rem;
    text-decoration: underline;
    cursor: pointer;
    margin-top: 10px;
}

/* ---------------------------------------------------------
   Public auth pages (login / signup)
   --------------------------------------------------------- */
.auth-card {
    max-width: 440px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    box-shadow: var(--shadow);
}
.auth-card__switch {
    text-align: center;
    font-size: 0.9rem;
    color: var(--ink-soft);
    margin: 20px 0 0;
}

/* ---------------------------------------------------------
   Breadcrumbs
   --------------------------------------------------------- */
.breadcrumbs {
    background: var(--marble-deep);
    border-bottom: 1px solid var(--line);
    padding: 10px 0;
}
.breadcrumbs ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    font-size: 0.82rem;
    color: var(--ink-soft);
}
.breadcrumbs li { display: flex; align-items: center; }
.breadcrumbs li:not(:last-child)::after {
    content: '/';
    margin: 0 8px;
    color: var(--line);
}
.breadcrumbs a { color: var(--ink-soft); }
.breadcrumbs a:hover { color: var(--terracotta); text-decoration: underline; }
.breadcrumbs li:last-child span { color: var(--ink); font-weight: 600; }

/* ---------------------------------------------------------
   Admin panel
   --------------------------------------------------------- */
.admin-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, var(--aegean-deep) 0%, var(--aegean) 100%);
    padding: 24px;
}
.admin-login__card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    width: 100%;
    max-width: 380px;
    box-shadow: var(--shadow);
}
.admin-login__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 4px;
}
.admin-login__brand .brand__mark-icon { color: var(--terracotta); }
.admin-login__tag {
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--olive);
    font-weight: 700;
    margin-bottom: 24px;
}
.admin-login__error {
    background: #FDECE7;
    color: var(--terracotta-deep);
    border: 1px solid #F3C9BB;
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 0.88rem;
    margin-bottom: 18px;
}
.admin-login__submit { width: 100%; margin-top: 6px; }

.admin-form { display: flex; flex-direction: column; gap: 16px; }
.admin-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink);
}
.admin-form input[type="text"],
.admin-form input[type="email"],
.admin-form input[type="password"],
.admin-form input[type="number"],
.admin-form select,
.admin-form textarea {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    font-family: var(--font-body);
    font-size: 0.95rem;
    padding: 10px 12px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--marble);
    color: var(--ink);
    font-weight: 400;
}
.admin-form textarea { min-height: 140px; resize: vertical; font-family: var(--font-body); }
.admin-form .admin-form__checkbox { flex-direction: row; align-items: center; gap: 8px; }
.admin-form .admin-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.admin-form .admin-form__actions { display: flex; gap: 12px; margin-top: 6px; }

.admin-shell { display: flex; min-height: 100vh; }
.admin-shell__sidebar {
    width: 240px;
    flex: none;
    background: var(--aegean-deep);
    color: #DCE7E9;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}
.admin-shell__brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 4px;
}
.admin-shell__brand .brand__mark-icon { color: var(--terracotta); }
.admin-shell__brand--dark { color: var(--ink); }
.admin-shell__tag {
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #8FA7AB;
    margin-bottom: 26px;
}
.admin-shell__nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.admin-shell__nav a {
    color: #DCE7E9;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.92rem;
}
.admin-shell__nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.admin-shell__nav a.is-active { background: var(--terracotta); color: #fff; }
.admin-shell__user {
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: 16px;
    margin-top: 16px;
}
.admin-shell__user p { color: #B9CBCF; font-size: 0.82rem; margin-bottom: 12px; }
.admin-shell__user strong { color: #fff; }
.admin-shell__logout { width: 100%; border-color: rgba(255,255,255,0.3); }
.admin-shell__main { flex: 1; padding: 40px; background: var(--marble); min-width: 0; }
.admin-shell__mobile-bar { display: none; }

.admin-page__head { margin-bottom: 28px; }
.admin-page__head h1 { margin-bottom: 4px; }
.admin-page__head p { margin: 0; }

.admin-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 36px;
}
.admin-stat-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 22px;
}
.admin-stat-card__num {
    display: block;
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--aegean-deep);
}
.admin-stat-card__label { display: block; color: var(--ink-soft); font-size: 0.88rem; margin: 4px 0 12px; }
.admin-stat-card a { font-weight: 700; font-size: 0.85rem; color: var(--terracotta); }

.admin-panel-block {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 26px;
    margin-bottom: 28px;
}
.admin-panel-block h2 { font-size: 1.15rem; margin-bottom: 14px; }
.admin-quicklinks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }

.admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}
.admin-message {
    background: var(--aegean-tint);
    color: var(--aegean-deep);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.admin-table-wrap {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow-x: auto;
}
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.admin-table th, .admin-table td {
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.admin-table th { background: var(--marble-deep); font-weight: 700; color: var(--ink-soft); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table td.admin-table__wrap { white-space: normal; max-width: 320px; }
.admin-table__actions { display: flex; gap: 10px; }
.admin-table__actions a { font-weight: 700; font-size: 0.85rem; }
.admin-table__actions a.is-danger { color: var(--terracotta); }
.admin-badge {
    display: inline-block;
    background: var(--aegean-tint);
    color: var(--aegean-deep);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
}
.admin-badge--muted { background: var(--marble-deep); color: var(--ink-soft); }

@media (max-width: 900px) {
    .admin-shell { flex-direction: column; }
    .admin-shell__sidebar { display: none; }
    .admin-shell__mobile-bar { display: block; padding-bottom: 20px; }
    .admin-shell__main { padding: 20px; }
    .admin-stat-grid { grid-template-columns: 1fr; }
    .admin-form .admin-form__row { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------
   Flashcards
   --------------------------------------------------------- */
.btn--ghost-dark {
    background: transparent;
    border-color: var(--aegean);
    color: var(--aegean);
}
.btn--ghost-dark:hover { background: var(--aegean-tint); }

.flashcard-app {
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
}
.flashcard-app__progress {
    font-size: 0.85rem;
    color: var(--ink-soft);
    font-weight: 600;
    margin-bottom: 18px;
}
.flashcard {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    perspective: 1400px;
    display: block;
}
.flashcard__inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.5s;
    transform-style: preserve-3d;
}
.flashcard.is-flipped .flashcard__inner { transform: rotateY(180deg); }
.flashcard__face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    font-size: 1.6rem;
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--ink);
}
.flashcard__face--front { color: var(--aegean-deep); }
.flashcard__face--back { transform: rotateY(180deg); background: var(--aegean-tint); }
.flashcard-app__hint {
    font-size: 0.82rem;
    color: var(--ink-soft);
    margin: 14px 0 26px;
}
.flashcard-app__controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
.flashcard-app__rating {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    text-align: center;
}
.flashcard-app__rating-label {
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin-bottom: 12px;
}
.flashcard-app__rating-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}
.rating-btn {
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    border: none;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    color: #fff;
}
.rating-btn:disabled { opacity: 0.6; cursor: default; }
.rating-btn--again { background: #B4432E; }
.rating-btn--hard  { background: #C1542E; }
.rating-btn--good  { background: #3E7D63; }
.rating-btn--easy  { background: #1B5E73; }
.flashcard-app__rating-saved {
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--olive);
    font-weight: 600;
}

@media (max-width: 760px) {
    .flashcard__face { font-size: 1.2rem; padding: 20px; }
}

/* ---------------------------------------------------------
   Verb Conjugator
   --------------------------------------------------------- */
.conjugator-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 28px;
}
.conjugator-form select {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: none;
    font-family: var(--font-body);
    font-size: 1rem;
    min-width: 220px;
}
.conjugator-tables {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-top: 12px;
}
.conjugator-table {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
}
.conjugator-table h3 {
    font-size: 1rem;
    margin-bottom: 14px;
    color: var(--aegean-deep);
}
.conjugator-table table { width: 100%; border-collapse: collapse; }
.conjugator-table td { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 0.94rem; }
.conjugator-table tr:last-child td { border-bottom: none; }
.conjugator-table td:first-child { color: var(--ink-soft); font-size: 0.85rem; width: 40%; }
.conjugator-table td:last-child { font-weight: 600; color: var(--ink); }
.conjugator-imperative {
    background: var(--marble-deep);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    margin-top: 22px;
}
.conjugator-imperative h3 { font-size: 1rem; margin-bottom: 10px; color: var(--aegean-deep); }

@media (max-width: 980px) {
    .conjugator-tables { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
    .conjugator-tables { grid-template-columns: 1fr; }
}
.dict-search {
    display: flex;
    gap: 10px;
    max-width: 560px;
    margin-top: 28px;
    flex-wrap: wrap;
}
.dict-search__input {
    flex: 1 1 320px;
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    border: 1.5px solid transparent;
    font-family: var(--font-body);
    font-size: 1rem;
}
.dict-search__input:focus-visible { outline: 3px solid var(--gold); outline-offset: 1px; }
.dict-search__btn { flex: 0 0 auto; }

.dict-results {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.level-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}
.level-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1.5px solid var(--line);
    background: #fff;
    color: var(--ink-soft);
    font-weight: 600;
    font-size: 0.9rem;
}
.level-tab:hover { border-color: var(--aegean); color: var(--aegean-deep); }
.level-tab.is-active { background: var(--aegean); border-color: var(--aegean); color: #fff; }
.level-tab.is-empty:not(.is-active) { opacity: 0.55; }
.level-tab__count {
    font-size: 0.76rem;
    font-weight: 700;
    opacity: 0.75;
}

.dict-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 36px;
}
.dict-pagination__status {
    font-size: 0.88rem;
    color: var(--ink-soft);
    font-weight: 600;
}
.dict-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 22px;
}
.dict-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}
.dict-card__headword {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--aegean-deep);
}
.dict-card__translit {
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin-left: 4px;
}
.dict-card__level {
    flex: none;
    background: var(--aegean-tint);
    color: var(--aegean-deep);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 3px 9px;
    border-radius: 999px;
}
.dict-card__save {
    flex: none;
    background: none;
    border: none;
    padding: 2px;
    cursor: pointer;
    color: var(--ink-soft);
}
.dict-card__save svg { width: 20px; height: 20px; display: block; }
.dict-card__save:hover { color: var(--terracotta); }
.dict-card__save.is-saved { color: var(--terracotta); }
.dict-card__pos {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--olive);
    font-weight: 700;
    margin-bottom: 10px;
}
.dict-card__translation {
    font-size: 1rem;
    color: var(--ink);
    font-weight: 500;
    margin-bottom: 12px;
}
.dict-card__example {
    border-top: 1px solid var(--line);
    padding-top: 12px;
    margin-top: 4px;
}
.dict-card__example p { font-size: 0.88rem; margin-bottom: 4px; }
.dict-card__example p:last-child { margin-bottom: 0; color: var(--ink-soft); }

@media (max-width: 980px) {
    .dict-results { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
    .dict-results { grid-template-columns: 1fr; }
}
@media (max-width: 1200px) and (min-width: 761px) {
    .main-nav__link { padding: 10px 10px; font-size: 0.88rem; }
    .brand__sub { display: none; }
}

@media (max-width: 980px) {
    .section-grid { grid-template-columns: repeat(2, 1fr); margin-top: -64px; }
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .site-footer__top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
    .main-nav { 
        display: none;
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        background: var(--aegean-deep);
        flex-direction: column;
        align-items: stretch;
        padding: 8px 16px 16px;
        box-shadow: var(--shadow);
        max-height: 80vh;
        overflow-y: auto;
    }
    .main-nav.is-open { display: flex; }
    .main-nav__link { padding: 12px 14px; }
    .nav-toggle { display: inline-flex; }
    .header-actions .btn--outline-desktop { display: none; }
    .nav-sep { display: none; }
    .nav-item { flex-direction: column; align-items: stretch; width: 100%; }
    .nav-dropdown {
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
        background: rgba(255,255,255,0.06);
        display: none;
        min-width: 0;
        width: 100%;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    .nav-item.is-open .nav-dropdown { display: block; }
    .nav-dropdown__list a { color: #DCE7E9; }
    .nav-dropdown__list a:hover { background: rgba(255,255,255,0.1); color: #fff; }
    .nav-dropdown__explore { color: var(--gold); border-top-color: rgba(255,255,255,0.15); }

    .section-grid { grid-template-columns: 1fr; margin-top: -48px; }
    .feature-grid { grid-template-columns: 1fr; }
    .hero__inner { padding: 64px 20px 110px; }
    .site-footer__top { grid-template-columns: 1fr; padding: 48px 0 24px; }
}
