/* Greek theme: white marble with gold and silver trims. theme.js re-tones every existing colour at runtime;
   this file supplies the marble itself, the design tokens and the few hand-tuned spots.
   Everything is scoped to html[data-theme="greek"] so the Roman look is untouched. */

/* Theme picker on the Settings page (shown in both themes) */
.theme-pick { display: flex; gap: 12px; flex-wrap: wrap; }
.theme-option {
  display: grid; grid-template-columns: 44px auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  min-width: 210px; padding: 10px 16px 10px 10px; border-radius: 14px; cursor: pointer; text-align: left;
  border: 1px solid rgb(246 220 156 / .28); background: rgb(255 236 214 / .04); color: inherit; font: inherit;
  transition: border-color .16s, box-shadow .16s, transform .16s;
}
.theme-option:hover { transform: translateY(-1px); }
.theme-option[aria-checked="true"] { border-color: #d9ab52; box-shadow: 0 0 0 1px #d9ab52, 0 8px 26px -10px rgb(217 171 82 / .6); }
.theme-swatch { grid-row: 1 / 3; width: 44px; height: 44px; border-radius: 10px; }
.theme-roman .theme-swatch { background: radial-gradient(at 70% 35%, #b8362e, #5a1814 60%, #230e0b); box-shadow: inset 0 0 0 2px #d9ab52; }
.theme-greek .theme-swatch {
  background:
    linear-gradient(115deg, transparent 38%, rgb(150 156 166 / .5) 40%, transparent 43%, transparent 66%, rgb(150 156 166 / .35) 67.5%, transparent 69%),
    linear-gradient(160deg, #ffffff, #ece9e2);
  box-shadow: inset 0 0 0 2px #c9ced6, inset 0 0 0 4px #d9ab52;
}
.theme-name { font-weight: 700; font-size: 15px; }
.theme-desc { font-size: 12.5px; opacity: .72; }

/* Hide the brief moment before the marble re-tone lands */
html[data-theme="greek"]:not(.theme-ready) body { opacity: 0; }
html[data-theme="greek"] body { transition: opacity .25s ease; }

html[data-theme="greek"] {
  color-scheme: light;
  /* design tokens (theme.js also re-tones any raw colours, these are the hand-picked ones) */
  --gk-marble: #f4f1eb;
  --gk-marble-hi: #fbfaf7;
  --gk-silver: #b9c0ca;
  --gk-silver-hi: #e3e7ec;
  --gk-silver-lo: #8a929e;
  --gk-ink: #1e2633;
  --gk-ink-2: #465163;
  --gk-ink-3: #6c7686;
  --gk-gold: #c8973e;
  --gk-gold-deep: #8c6418;
  --gk-gold-hi: #e9c87a;
  --gk-aegean: #2f5d8a;

  --ec-ink-0: #fbfaf7;
  --ec-ink-1: #f4f1eb;
  --ec-ink-2: #ffffff;
  --ec-ink-3: #eef0f3;
  --ec-wine: #a9b1bd;
  --ec-wine-hi: #8a929e;
  --ec-gold-hi: #a57827;   /* used as text a lot, so it must read on white */
  --ec-gold: #c0913a;
  --ec-gold-lo: #8c6418;
  --ec-text: #1e2633;
  --ec-text-2: #465163;
  --ec-text-3: #6c7686;
  --ec-right: #2f7a3a;
  --ec-wrong: #b42e2e;
  --ec-line: rgb(140 100 24 / .22);
  --ec-line-2: rgb(140 100 24 / .38);
  --ec-line-3: rgb(140 100 24 / .6);
  /* panels are their own cut slabs of the same stone: a soft white polish over the real marble */
  --gk-marble-img: url("assets/greek-marble.jpg?v=gk5");
  --ec-glass: linear-gradient(180deg, rgb(255 255 255 / .8), rgb(250 249 246 / .66)), var(--gk-marble-img) 38% 22% / 1500px auto;
  --ec-glass-fill: rgb(255 255 255 / .74);
  --ec-shadow-1: inset 0 1px 0 rgb(255 255 255 / .9), 0 1px 0 rgb(185 192 202 / .7), 0 12px 30px -16px rgb(30 38 51 / .28);
  --ec-shadow-2: inset 0 1px 0 rgb(255 255 255 / .9), 0 1px 0 rgb(185 192 202 / .8), 0 24px 56px -22px rgb(30 38 51 / .34);
  --ec-glow-gold: 0 0 0 1px rgb(200 151 62 / .55), 0 10px 30px -10px rgb(200 151 62 / .45);
  --ui-ink: #1e2633;
  --ui-field: rgb(255 255 255 / .85);
  --ui-field-border: rgb(138 146 158 / .55);
  --menu-ink: #ffffff;
  --menu-text: #1e2633;
  --menu-muted: #5a6474;
  --menu-accent: #8c6418;
  --who-cream: #fbfaf7;
  --who-cream-ink: #1e2633;
  --who-screen: #eef0f3;
  --em-glass: rgb(255 255 255 / .82);
  --em-glass-hi: rgb(255 255 255 / .92);
  --em-edge: rgb(140 100 24 / .3);
  --arena-background: radial-gradient(ellipse at 46% 43%, #ffffff, #efece5 60%, #e2e5ea 92%);
  --arena-panel: linear-gradient(145deg, #ffffff, #eef0f3);
  --arena-gold: #c8973e;
  --arena-text: #1e2633;
}

/* ------------------------------------------------------------- the marble */
html[data-theme="greek"],
html[data-theme="greek"] body,
html[data-theme="greek"] body.roman-menu { background-color: var(--gk-marble) !important; color: var(--gk-ink); }
/* the body's own (re-toned) gradient used to paint over the marble layer below: let the slab show */
html[data-theme="greek"] body.roman-menu { background: transparent !important; }

html[data-theme="greek"] body.roman-menu::before,
html[data-theme="greek"] body.roman-menu.home-view::before {
  display: block !important;
  animation: none !important;
  transform: none !important;
  opacity: 1 !important;
  background:
    /* soft light from above, like sun on a temple floor */
    radial-gradient(90vmax 55vmax at 50% -12%, rgb(255 255 255 / .55), transparent 62%),
    /* a faint polished sheen across the slab */
    linear-gradient(115deg, transparent 30%, rgb(255 255 255 / .18) 46%, transparent 60%),
    /* the stone itself: a 2560px procedural Calacatta slab (veins, gold seams, hairlines, crystal grain) */
    var(--gk-marble-img) center / cover no-repeat,
    #f4f2ed !important;
}
/* fine stone grain instead of the film-grain vignette (the slab has its own grain, so only a touch) */
html[data-theme="greek"] body.roman-menu::after,
html[data-theme="greek"] body.roman-menu.home-view::after {
  opacity: .22 !important;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .32 0 0 0 0 .36 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") !important;
}
html[data-theme="greek"] .ec-cursor-light { mix-blend-mode: normal; background: radial-gradient(circle, rgb(233 200 122 / .14), transparent 62%); }

/* ------------------------------------------------------------- header & footer: marble slab with gold over silver trim */
html[data-theme="greek"] body > header {
  /* No backdrop-filter here: it turns the header into the containing block for position:fixed children,
     which dragged the floating Settings/Help buttons up under the corner portrait. */
  background: linear-gradient(180deg, rgb(255 255 255 / .74), rgb(250 249 246 / .66)), var(--gk-marble-img) 62% 8% / 1800px auto, #f6f4ef !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  border-bottom: 0 !important;
  box-shadow: 0 1px 0 var(--gk-gold), 0 3px 0 var(--gk-silver-hi), 0 4px 0 var(--gk-silver), 0 14px 30px -18px rgb(30 38 51 / .35) !important;
}
html[data-theme="greek"] body > footer {
  background: linear-gradient(0deg, rgb(255 255 255 / .74), rgb(250 249 246 / .66)), var(--gk-marble-img) 20% 90% / 1800px auto, #f6f4ef !important;
  border-top: 0 !important;
  box-shadow: 0 -1px 0 var(--gk-gold), 0 -3px 0 var(--gk-silver-hi), 0 -4px 0 var(--gk-silver) !important;
  color: var(--gk-ink-2) !important;
}

/* Greek key (meander) band, used as a trim under page headings */
html[data-theme="greek"] body.roman-menu main > .roman-page > header:first-of-type::after,
html[data-theme="greek"] .settings-head::after {
  content: ""; display: block; height: 11px; margin: 14px auto 0; max-width: 300px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='11' viewBox='0 0 16 11' fill='none' stroke='%23b8862e' stroke-width='1.2'%3E%3Cpath d='M0 10.4H16M0 .6H16M13 10.4V3H4v5h6V5.5H7'/%3E%3C/svg%3E") repeat-x 0 0 / 16px 11px;
  opacity: .9;
}
html[data-theme="greek"] .lx { --gold: #a57827; --gold-2: #8c6418; }
/* match HP banner: champion accent colours are pale (made for dark), so names use ink on the marble chip */
html[data-theme="greek"] .health-top b { color: var(--gk-ink) !important; }

/* ------------------------------------------------------------- headings: polished gold, not white-hot */
html[data-theme="greek"] body.roman-menu main h1 {
  background: linear-gradient(180deg, #b8862e 0%, #8c6418 55%, #5e420e 100%) !important;
  -webkit-background-clip: text !important; background-clip: text !important; color: transparent !important;
}
html[data-theme="greek"] body.roman-menu main :is(h2, h3) { color: var(--gk-ink) !important; }
html[data-theme="greek"] :is(.roman-eyebrow, .ec-eyebrow) { color: var(--gk-gold-deep) !important; }

/* arena loading screen: the quotes sit on the marble slab, in a cut-stone panel with gold over silver trim */
html[data-theme="greek"] #app > .arena-loading-cover {
  background:
    radial-gradient(90vmax 55vmax at 50% -12%, rgb(255 255 255 / .55), transparent 62%),
    linear-gradient(180deg, transparent 60%, rgb(244 241 235 / .85)),
    var(--arena-cover) center / cover no-repeat,
    var(--gk-marble-img) center / cover no-repeat,
    var(--gk-marble) !important;
}
html[data-theme="greek"] .loading-quote figcaption {
  border: 1px solid var(--gk-silver) !important;
  background: linear-gradient(180deg, rgb(255 255 255 / .86), rgb(250 249 246 / .74)), var(--gk-marble-img) 38% 22% / 1500px auto, var(--gk-marble-hi) !important;
  box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--gk-gold), 0 30px 60px -28px rgb(30 38 51 / .4) !important;
}
html[data-theme="greek"] .loading-quote blockquote { color: var(--gk-ink) !important; text-shadow: none !important; }
html[data-theme="greek"] .loading-quote figcaption p { color: var(--gk-gold-deep) !important; }
html[data-theme="greek"] .loading-quote figcaption p::before,
html[data-theme="greek"] .loading-quote figcaption p::after { background: var(--gk-gold) !important; }
html[data-theme="greek"] #app > .arena-loading-cover > .loading-footer { text-shadow: none !important; }
html[data-theme="greek"] .loading-footer h2 { color: var(--gk-ink) !important; }
html[data-theme="greek"] .loading-footer p { color: var(--gk-gold-deep) !important; }

/* image heroes: the art sits behind a deep Aegean night scrim inside a marble frame, text stays light */
html[data-theme="greek"] .hub-arena { border: 1px solid var(--gk-silver) !important; box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--gk-gold), 0 30px 60px -30px rgb(30 38 51 / .5) !important; }
html[data-theme="greek"] .hub-arena::after {
  background: linear-gradient(90deg, rgb(14 22 36 / .94) 0%, rgb(14 22 36 / .66) 45%, rgb(14 22 36 / .1) 75%), linear-gradient(0deg, rgb(14 22 36 / .9), transparent 40%) !important;
}
html[data-theme="greek"] .hub-arena-art, html[data-theme="greek"] .arena-cta-art { filter: brightness(.62) saturate(.85) !important; }
html[data-theme="greek"] .hub-arena-copy #hub-arena-title { color: #fbfaf7 !important; -webkit-text-fill-color: #fbfaf7; text-shadow: 0 4px 24px rgb(0 0 0 / .6) !important; }
html[data-theme="greek"] .hub-arena-tagline { color: #dfe4ea !important; text-shadow: 0 2px 14px rgb(0 0 0 / .5) !important; }
html[data-theme="greek"] .hub-arena .hub-eyebrow { color: var(--gk-gold-hi) !important; }
html[data-theme="greek"] .hub-arena-cta button:not(.is-primary) { color: #fbfaf7 !important; border-color: rgb(227 231 236 / .6) !important; background: rgb(255 255 255 / .08) !important; }
html[data-theme="greek"] .hub-arena-cta button:not(.is-primary) * { color: #dfe4ea !important; }
html[data-theme="greek"] .hub-arena-cta .is-primary,
html[data-theme="greek"] :is(.roman-primary, .primary, button.primary) {
  background: linear-gradient(180deg, #f3dc9e, #d6a750 52%, #b98a33) !important;
  color: #2a1d06 !important; border-color: #a9b1bd !important;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .7), 0 0 0 1px #a9b1bd, 0 8px 20px -10px rgb(140 100 24 / .6) !important;
  text-shadow: none !important;
}
html[data-theme="greek"] .hub-arena-cta .is-primary * { color: #4a3510 !important; }
html[data-theme="greek"] .hub-arena-champs img { border-color: var(--gk-gold-hi) !important; }
html[data-theme="greek"] .hub-modes { background: var(--gk-silver) !important; border-top: 1px solid var(--gk-gold) !important; }
html[data-theme="greek"] .hub-modes button { background: linear-gradient(180deg, #ffffff, #f2f0eb) !important; }
html[data-theme="greek"] .hub-modes button:hover { background: linear-gradient(180deg, #fffdf6, #f6eedb) !important; }
html[data-theme="greek"] .hub-modes b { color: var(--gk-ink) !important; }
html[data-theme="greek"] .hub-modes small { color: var(--gk-ink-3) !important; }
html[data-theme="greek"] .arena-cta :is(h1, h2, h3, p, b, strong) { color: #fbfaf7 !important; -webkit-text-fill-color: #fbfaf7; background: none !important; text-shadow: 0 2px 14px rgb(0 0 0 / .55) !important; }

/* inputs */
html[data-theme="greek"] :is(input:not([type=checkbox]):not([type=radio]):not([type=range]), textarea, select) {
  background-color: #fff !important; color: var(--gk-ink) !important; border-color: rgb(138 146 158 / .6) !important;
}
html[data-theme="greek"] ::selection { background: rgb(200 151 62 / .3); color: var(--gk-ink); }
html[data-theme="greek"] dialog::backdrop { background: rgb(232 228 220 / .7); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }

/* scrollbars */
html[data-theme="greek"] { scrollbar-color: #b9c0ca transparent; }

/* theme picker in the Greek look */
html[data-theme="greek"] .theme-option { border-color: rgb(138 146 158 / .45); background: #fff; color: var(--gk-ink); }
html[data-theme="greek"] .theme-option[aria-checked="true"] { border-color: var(--gk-gold); box-shadow: 0 0 0 1px var(--gk-gold), 0 8px 24px -12px rgb(140 100 24 / .55); }

/* Empire Tracker search: one faint marble slab (no white field inside the pill), dropdown cut from the same stone */
html[data-theme="greek"] body .em-stage .em-search {
  background: linear-gradient(180deg, rgb(255 255 255 / .78), rgb(250 249 246 / .7)), var(--gk-marble-img) 30% 40% / 1400px auto, #f6f4ef;
  border-color: rgb(140 100 24 / .32);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .9), 0 8px 22px -14px rgb(30 38 51 / .35);
}
html[data-theme="greek"] body .em-stage .em-search:focus-within {
  background: linear-gradient(180deg, rgb(255 255 255 / .84), rgb(250 249 246 / .78)), var(--gk-marble-img) 30% 40% / 1400px auto, #f6f4ef;
  border-color: rgb(200 151 62 / .7);
}
html[data-theme="greek"] body .em-stage .em-search input.em-search-input { background: transparent !important; color: var(--gk-ink, #1e2633); }
html[data-theme="greek"] body .em-stage .em-suggest {
  z-index: 30;
  background: linear-gradient(180deg, rgb(255 255 255 / .86), rgb(250 249 246 / .8)), var(--gk-marble-img) 60% 20% / 1400px auto, #f6f4ef;
  border-color: rgb(140 100 24 / .32);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .9), 0 24px 48px -18px rgb(30 38 51 / .45);
}
html[data-theme="greek"] body .em-stage .em-sug-head { color: #8c6418; }
html[data-theme="greek"] body .em-stage .em-suggest button { color: var(--gk-ink, #1e2633); }
html[data-theme="greek"] body .em-stage .em-suggest button:hover { background: rgb(200 151 62 / .16); }

/* ---- Home: Today's dailies, Greek dress (meander band, laurel, gold coin medallions, theatre mask) ---- */
html[data-theme="greek"] .hub-laurel { display: block; width: 52px; height: 20px; color: var(--gk-gold); }
html[data-theme="greek"] .hub-laurel:last-child { transform: scaleX(-1); }
html[data-theme="greek"] .hub-dailies-head h2 { color: var(--gk-ink) !important; letter-spacing: .02em; }
html[data-theme="greek"] .hub-daily {
  padding: 24px 18px 12px; border-radius: 6px !important; border: 1px solid var(--gk-silver) !important;
  background: linear-gradient(180deg, rgb(255 255 255 / .9), rgb(247 245 240 / .86)), var(--gk-marble-img) 40% 30% / 1400px auto, #f6f4ef !important;
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px rgb(200 151 62 / .55), 0 16px 32px -22px rgb(30 38 51 / .45) !important;
}
html[data-theme="greek"] .hub-daily::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 12px; border-bottom: 1px solid rgb(200 151 62 / .55);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12'%3E%3Cpath d='M0 10.5H24M20 10.5V1.5H5.5V8H13V4.5H9.5' fill='none' stroke='%23c8973e' stroke-width='1.3'/%3E%3C/svg%3E") 0 0 / 24px 12px repeat-x;
  opacity: .9;
}
html[data-theme="greek"] .hub-daily:hover { box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--gk-gold), 0 20px 36px -20px rgb(140 100 24 / .5) !important; }
html[data-theme="greek"] .hub-daily-kicker { color: var(--gk-gold-deep) !important; }
html[data-theme="greek"] .hub-daily-line { color: var(--gk-ink-2) !important; font-size: 15px; }
html[data-theme="greek"] .hub-daily-line b { color: var(--gk-ink) !important; }
html[data-theme="greek"] .hub-daily-photo {
  border: 2px solid var(--gk-gold) !important;
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--gk-silver), 0 8px 18px -8px rgb(30 38 51 / .5) !important;
}
html[data-theme="greek"] .hub-daily-photo.is-mystery,
html[data-theme="greek"] .hub-daily-photo.is-footnote {
  border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f3dc9e, #c8973e 55%, #8c6418) !important;
}
html[data-theme="greek"] .hub-daily-photo .hub-footnote { color: #fffaf0; }
html[data-theme="greek"] .hub-footnote-glass { fill: #c08f38; }
html[data-theme="greek"] .hub-daily-photo .hub-phone { display: none; }
html[data-theme="greek"] .hub-daily-photo .hub-mask { display: block; width: 38px; height: 38px; color: #fffaf0; }
html[data-theme="greek"] .hub-daily-photo.is-ringing .hub-mask { animation: hub-ring 2.4s ease-in-out infinite; transform-origin: 50% 60%; }
html[data-theme="greek"] .hub-ping { border-color: #fff !important; }
html[data-theme="greek"] .hub-daily-go { background: linear-gradient(180deg, var(--gk-gold-hi), var(--gk-gold)) !important; color: #fffaf0 !important; }
html[data-theme="greek"] .hub-daily[data-state="done"] .hub-daily-go { background: rgb(47 122 58 / .12) !important; color: var(--ec-right) !important; }
@media (prefers-reduced-motion: reduce) { html[data-theme="greek"] .hub-daily-photo.is-ringing .hub-mask { animation: none; } }

/* Menu icon tiles: the icons are pale-gold line art, so give them a gold coin to sit on */
html[data-theme="greek"] body.roman-menu > header nav :is(#offline-options, #learn-options, #online-options) button::before,
html[data-theme="greek"] body.roman-menu > header nav .nav-group-title::before {
  background: var(--ic) center / 22px 22px no-repeat, radial-gradient(circle at 35% 30%, #d9b264, #a57827 60%, #7a5512) !important;
  border-color: var(--gk-gold-deep) !important;
}
