@font-face { font-family:"Radikal"; src:url(fonts/Radikal-Light.otf);   font-weight:300; font-display:swap; }
@font-face { font-family:"Radikal"; src:url(fonts/Radikal-Regular.otf); font-weight:400; font-display:swap; }
@font-face { font-family:"Radikal"; src:url(fonts/Radikal-Medium.otf);  font-weight:500; font-display:swap; }
@font-face { font-family:"Radikal"; src:url(fonts/Radikal-Bold.otf);    font-weight:700; font-display:swap; }
@font-face { font-family:"Radikal"; src:url(fonts/Radikal-Black.otf);   font-weight:900; font-display:swap; }

/* ---- themes -------------------------------------------------------------
 * theme.js sets <html data-theme="sunrise|day|sunset|night">; the palettes match any element
 * carrying data-theme, which is how test/themes.html shows all four at once.
 * Late night is the default, so a page with scripts blocked still looks like LMH.
 *
 * Core LMH colours only: Black #111111, White #FFFFFF, LMH Yellow #FFF200, with Warm Cream
 * #F7F3E8, Light Gray #D9D9D6 and Bright Teal #00C7C7 for support. Sunrise and Sunset are
 * Day and Late night plus a yellow horizon glow, so there is nothing new to learn.
 * Roles: --live = clocked on, --idle = nothing running, --head = small headings,
 * --idle-text = idle label text (darker on light grounds so it stays readable).
 */
/* LATE NIGHT: the LMH default. Black, white, yellow. */
:root, [data-theme="night"] {
  color-scheme: dark;
  --bg:#111111; --panel:#1a1a1a; --panel-2:#222222; --line:#2c2c2c;
  --ink:#FFFFFF; --ink-2:#D9D9D6; --ink-3:#8a8a85;
  --live:#FFF200; --on-live:#111111; --head:#FFF200;
  --idle:#00C7C7; --idle-text:#00C7C7; --danger:#ff6b5e;
  --sky:none; --halo:0; --glow:none; --text-glow:none; --glow-top:none;
  --r:14px;
}
/* SUNSET: Late night with a yellow dusk glow rising at the right, where the sun sets. */
[data-theme="sunset"] {
  color-scheme: dark;
  --bg:#111111; --panel:#1a1a1a; --panel-2:#222222; --line:#2c2c2c;
  --ink:#FFFFFF; --ink-2:#D9D9D6; --ink-3:#8a8a85;
  --live:#FFF200; --on-live:#111111; --head:#FFF200;
  --idle:#00C7C7; --idle-text:#00C7C7; --danger:#ff6b5e;
  /* Glow all over: the horizon at the right, plus soft pools at the corners and edges. */
  --sky:radial-gradient(120% 62% at 82% 112%, rgba(255,242,0,.30) 0%, rgba(255,242,0,.11) 42%, rgba(255,242,0,0) 74%),
        radial-gradient(55% 42% at 100% 0%, rgba(255,242,0,.17) 0%, rgba(255,242,0,0) 70%),
        radial-gradient(48% 38% at 0% 40%, rgba(255,242,0,.12) 0%, rgba(255,242,0,0) 70%),
        radial-gradient(42% 34% at 12% 100%, rgba(255,242,0,.12) 0%, rgba(255,242,0,0) 70%);
  --halo:.75; --glow:0 0 26px rgba(255,242,0,.20); --text-glow:0 0 20px rgba(255,242,0,.55); --glow-top:0 30px 90px -30px rgba(255,242,0,.25);
}
/* DAY: White page, Warm Cream surfaces, LMH Yellow, Light Gray lines. */
[data-theme="day"] {
  color-scheme: light;
  --bg:#FFFFFF; --panel:#FBF9F3; --panel-2:#F7F3E8; --line:#D9D9D6;
  --ink:#111111; --ink-2:#4a4a46; --ink-3:#77766f;
  --live:#FFF200; --on-live:#111111; --head:#111111;
  --idle:#00B5B5; --idle-text:#007a7a; --danger:#c8372a;
  --sky:none; --halo:0; --glow:none; --text-glow:none; --glow-top:none;
}
/* SUNRISE: Day with a yellow dawn glow rising at the left, where the sun comes up. */
[data-theme="sunrise"] {
  color-scheme: light;
  --bg:#FFFFFF; --panel:#FBF9F3; --panel-2:#F7F3E8; --line:#D9D9D6;
  --ink:#111111; --ink-2:#4a4a46; --ink-3:#77766f;
  --live:#FFF200; --on-live:#111111; --head:#111111;
  --idle:#00B5B5; --idle-text:#007a7a; --danger:#c8372a;
  /* Glow all over: the horizon at the left, plus soft pools at the corners and edges. */
  --sky:radial-gradient(120% 70% at 18% 112%, rgba(255,242,0,.60) 0%, rgba(255,242,0,.24) 38%, rgba(255,242,0,0) 72%),
        radial-gradient(58% 44% at 0% 0%, rgba(255,242,0,.38) 0%, rgba(255,242,0,0) 70%),
        radial-gradient(52% 40% at 100% 30%, rgba(255,242,0,.26) 0%, rgba(255,242,0,0) 70%),
        radial-gradient(44% 36% at 88% 100%, rgba(255,242,0,.24) 0%, rgba(255,242,0,0) 70%);
  --halo:.8; --glow:0 0 28px rgba(255,242,0,.55); --text-glow:0 0 16px rgba(255,242,0,.85); --glow-top:0 30px 90px -30px rgba(255,242,0,.45);
}
/* Small headings carry an LMH yellow block, the way the LMH product logos board does. */
h1::before { content:""; display:inline-block; width:.72em; height:.72em; background:var(--live); margin-right:.65em; vertical-align:-.02em; }
[data-theme="sunrise"] h1::before, [data-theme="day"] h1::before { box-shadow:0 0 0 1px var(--ink); }
/* The horizon: a fixed layer behind everything. Only Sunrise and Sunset define --sky. */
body::before { content:""; position:fixed; inset:0; z-index:-1; pointer-events:none; background:var(--sky); }
.mk-halo { opacity:var(--halo); }
/* The logo's sun gets a hairline ink edge on light looks so yellow stays visible;
   on dark looks it has none, matching the approved artwork. */
.sun { color:var(--ink); }
[data-theme="sunset"] .mk-sun, [data-theme="night"] .mk-sun, :root:not([data-theme]) .mk-sun { stroke:none; }
body { transition:background-color .6s ease, color .6s ease; }
.top, .clock, .card, .project, dialog, .stat, .btn, input, select, textarea { transition:background-color .6s ease, border-color .6s ease; }
@media (prefers-reduced-motion: reduce) {
  body, .top, .clock, .card, .project, dialog, .stat, .btn, input, select, textarea { transition:none; }
}
* { box-sizing:border-box; }
html { -webkit-text-size-adjust:100%; }
body { margin:0; background:var(--bg); color:var(--ink); font:400 15px/1.45 "Radikal","Helvetica Neue",Arial,sans-serif;
       padding-bottom:env(safe-area-inset-bottom); }
button, input, select, textarea { font:inherit; color:inherit; }
button { cursor:pointer; }
:focus-visible { outline:3px solid var(--live); outline-offset:2px; border-radius:6px; }
[hidden] { display:none !important; }
.sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }

/* ---- top bar ---- */
.top { display:flex; align-items:center; gap:20px; flex-wrap:wrap; padding:14px 16px; border-bottom:1px solid var(--line);
       position:sticky; top:0; z-index:5; background:var(--bg); }
.brand { display:flex; align-items:center; gap:10px; text-decoration:none; color:inherit; }
.sun svg { width:46px; height:46px; display:block; }
.word { display:flex; flex-direction:column; line-height:1; }
.word small { font-weight:300; letter-spacing:.32em; font-size:10px; margin-bottom:3px; }
.word strong { font-weight:900; letter-spacing:.14em; font-size:19px; }
.tabs { display:flex; gap:4px; flex:1; }
.tabs button { background:none; border:0; padding:9px 14px; border-radius:999px; color:var(--ink-2); font-weight:500; }
.tabs button[aria-selected="true"] { background:var(--ink); color:var(--bg); }
.who { color:var(--ink-3); font-size:13px; text-align:right; }
.who b { color:var(--ink-2); font-weight:500; }

main { max-width:1040px; margin:0 auto; padding:24px 16px 80px; }
h1 { font-size:13px; font-weight:700; letter-spacing:.2em; text-transform:uppercase; color:var(--head); margin:0 0 14px; }
h2 { font-size:22px; font-weight:700; margin:0 0 6px; }
.muted { color:var(--ink-3); }
.row { display:flex; gap:12px; align-items:center; flex-wrap:wrap; }
.grow { flex:1; }

/* ---- buttons ---- */
.btn { border:1px solid var(--line); background:var(--panel-2); border-radius:999px; padding:9px 16px; font-weight:500; }
.btn:hover { border-color:var(--ink-3); }
.btn.primary { background:var(--live); color:var(--on-live); border-color:transparent; font-weight:700; }
.btn.ghost { background:none; }
.btn.danger { color:var(--danger); }
.btn.sm { padding:5px 12px; font-size:13px; }
.btn[disabled] { opacity:.4; cursor:not-allowed; }

/* ---- the clock panel ---- */
.clock { background:var(--panel); border:1px solid var(--line); border-radius:var(--r); padding:20px; margin-bottom:24px; }
.clock.running { border-color:var(--live); }
.clock.idle { border-color:var(--idle); }
.state { display:flex; align-items:center; gap:10px; }
.dot { width:12px; height:12px; border-radius:50%; background:var(--idle); flex:none; }
.running .dot { background:var(--live); box-shadow:0 0 0 0 var(--live); animation:pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow:0 0 0 10px transparent; } 100% { box-shadow:0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .running .dot { animation:none; } }
.big { font-size:44px; font-weight:900; letter-spacing:.02em; font-variant-numeric:tabular-nums; line-height:1.05; }
.splitnote { color:var(--ink-2); font-size:14px; margin-top:2px; }

.moored { display:grid; gap:10px; margin-top:16px; }
.card { display:grid; grid-template-columns:1fr auto; gap:6px 16px; background:var(--panel-2); border-radius:12px; padding:14px 16px; align-items:center; }
.card .name { font-weight:700; }
.card .client { color:var(--ink-3); font-size:13px; }
.card .time { text-align:right; font-variant-numeric:tabular-nums; }
.card .time b { font-size:22px; font-weight:700; }
.card .time small { display:block; color:var(--ink-3); font-size:12px; }
.card .ctl { grid-column:1 / -1; display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.card.anch { border:1px dashed var(--idle); background:transparent; }
.tag { font-size:11px; letter-spacing:.14em; text-transform:uppercase; color:var(--idle-text); font-weight:700; }
.weight { display:inline-flex; align-items:center; gap:2px; background:var(--panel); border-radius:999px; padding:2px; }
.weight button { width:26px; height:26px; border:0; border-radius:50%; background:none; font-weight:700; }
.weight span { min-width:34px; text-align:center; font-size:13px; font-variant-numeric:tabular-nums; }

/* ---- project picker ---- */
.picker input[type=search] { width:100%; padding:14px 16px; border-radius:var(--r); border:1px solid var(--line); background:var(--panel); font-size:16px; }
.picker input[type=search]:focus { border-color:var(--live); outline:none; }
.projects { list-style:none; margin:10px 0 0; padding:0; display:grid; gap:6px; }
.project { display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:12px; background:var(--panel); border:1px solid transparent; }
.project[data-active="true"] { border-color:var(--live); }
.project .nm { flex:1; min-width:0; }
.project .nm b { font-weight:500; display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.project .nm small { color:var(--ink-3); }
.kind { font-size:10px; letter-spacing:.14em; text-transform:uppercase; border:1px solid var(--line); border-radius:999px; padding:2px 8px; color:var(--ink-3); }
.hint { color:var(--ink-3); font-size:12px; margin-top:8px; }
kbd { background:var(--panel-2); border:1px solid var(--line); border-radius:5px; padding:1px 6px; font-size:12px; }

/* ---- register ---- */
.daynav { display:flex; align-items:center; gap:10px; margin-bottom:14px; flex-wrap:wrap; }
.daynav h2 { margin:0 8px; }
table { width:100%; border-collapse:collapse; }
th { text-align:left; font-size:11px; letter-spacing:.16em; text-transform:uppercase; color:var(--ink-3); font-weight:700; padding:8px 10px; border-bottom:1px solid var(--line); }
td { padding:11px 10px; border-bottom:1px solid var(--line); vertical-align:top; }
td.num, th.num { text-align:right; font-variant-numeric:tabular-nums; }
td .sub { color:var(--ink-3); font-size:12px; }
tfoot td { font-weight:700; border-bottom:0; }
.empty { padding:32px; text-align:center; color:var(--ink-3); border:1px dashed var(--line); border-radius:var(--r); }

/* ---- reports ---- */
.bar { height:8px; background:var(--panel-2); border-radius:99px; overflow:hidden; margin-top:6px; }
.bar i { display:block; height:100%; background:var(--live); border-radius:99px; }
.bar.over i { background:var(--danger); }
.summary { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:12px; margin-bottom:20px; }
.stat { background:var(--panel); border:1px solid var(--line); border-radius:var(--r); padding:14px 16px; }
.stat b { display:block; font-size:28px; font-weight:900; font-variant-numeric:tabular-nums; }
.stat span { color:var(--ink-3); font-size:12px; letter-spacing:.12em; text-transform:uppercase; }

select, input[type=text], input[type=number], input[type=time], input[type=date], textarea {
  background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:8px 10px; }
label.f { display:grid; gap:4px; font-size:12px; color:var(--ink-3); letter-spacing:.08em; text-transform:uppercase; }
label.f input, label.f select, label.f textarea { text-transform:none; letter-spacing:0; font-size:15px; color:var(--ink); }

dialog { background:var(--panel); color:var(--ink); border:1px solid var(--line); border-radius:var(--r); padding:22px; width:min(480px,calc(100vw - 32px)); }
dialog::backdrop { background:rgba(0,0,0,.6); }
dialog form { display:grid; gap:14px; }

.toast { position:fixed; left:50%; bottom:24px; transform:translate(-50%,40px); background:var(--ink); color:var(--bg); padding:10px 18px;
         border-radius:999px; opacity:0; transition:.25s; pointer-events:none; font-weight:500; z-index:20; max-width:calc(100vw - 32px); }
.toast.show { opacity:1; transform:translate(-50%,0); }
.toast.err { background:var(--danger); color:#111; }

.signin { max-width:420px; margin:12vh auto; text-align:center; }
.signin .sun svg { width:96px; height:96px; margin:0 auto 12px; display:block; }

@media (max-width:640px) {
  .top { gap:10px; } .tabs { order:3; width:100%; flex:none; overflow-x:auto; }
  .who { margin-left:auto; } .big { font-size:36px; }
  th.hide-s, td.hide-s { display:none; }
}

/* ---- theme switcher ---- */
.themewrap { position:relative; order:1; }
.themebtn { display:flex; align-items:center; gap:8px; background:var(--panel-2); border:1px solid var(--line); border-radius:999px; padding:7px 13px 7px 9px; font-weight:500; font-size:13px; }
.themebtn:hover { border-color:var(--ink-3); }
.swatch { width:16px; height:16px; border-radius:50%; border:1px solid var(--ink-3); flex:none; display:inline-block; }
.menu { position:absolute; right:0; top:calc(100% + 8px); width:min(300px, calc(100vw - 32px)); background:var(--panel); border:1px solid var(--line);
        border-radius:14px; padding:8px; box-shadow:0 14px 44px rgba(0,0,0,.4); z-index:30; }
.menu .opt { display:flex; align-items:center; gap:12px; width:100%; text-align:left; background:none; border:0; border-radius:10px; padding:9px 10px; }
.menu .opt:hover, .menu .opt[aria-checked="true"] { background:var(--panel-2); }
.menu .opt b { font-weight:500; display:block; line-height:1.2; }
.menu .opt small { color:var(--ink-3); font-size:12px; }
.menu .opt .tick { margin-left:auto; color:var(--head); font-weight:700; }
.menu .sunline { color:var(--ink-3); font-size:12px; padding:10px 10px 4px; border-top:1px solid var(--line); margin-top:6px; }
.menu .loc { background:none; border:0; color:var(--head); padding:4px 10px 8px; font-size:12px; text-decoration:underline; text-underline-offset:3px; }
.who { order:2; }
@media (max-width:640px) { .themebtn .lbl-long { display:none; } }


/* ---- glow (Sunrise and Sunset only: the roles are "none" in Day and Late night) ---- */
.top { box-shadow:var(--glow-top); }
.clock, .stat, .card, .btn.primary, .tabs button[aria-selected="true"], .project[data-active="true"], .themebtn { box-shadow:var(--glow); }
.big { text-shadow:var(--text-glow); }
.card.anch { box-shadow:none; }
@keyframes breathe { from { opacity:.82; } to { opacity:1; } }
[data-theme="sunrise"] body::before, [data-theme="sunset"] body::before { animation:breathe 9s ease-in-out infinite alternate; }
@media (prefers-reduced-motion: reduce) { body::before { animation:none !important; } }

/* ---- beach life: small creatures that wander across every view ---- */
#beach { position:fixed; inset:0; z-index:3; pointer-events:none; overflow:hidden; }
#beach .crit { position:absolute; left:0; top:0; will-change:transform; opacity:.9; color:var(--ink); }
#beach svg { display:block; overflow:visible; }
#beach .ink { stroke:currentColor; }
#beach .fillink { fill:currentColor; }
#beach .y { fill:var(--live); }
#beach .t { stroke:var(--idle); }
#beach .paper { fill:var(--panel); }
@keyframes flapA { 0%,49% { opacity:1; } 50%,100% { opacity:0; } }
@keyframes flapB { 0%,49% { opacity:0; } 50%,100% { opacity:1; } }
#beach .wA { animation:flapA .7s steps(1) infinite; }
#beach .wB { animation:flapB .7s steps(1) infinite; }
@keyframes clawL { from { transform:rotate(-18deg); } to { transform:rotate(14deg); } }
@keyframes clawR { from { transform:rotate(18deg); } to { transform:rotate(-14deg); } }
#beach .cl { transform-origin:10px 17px; animation:clawL .45s ease-in-out infinite alternate; }
#beach .cr { transform-origin:34px 17px; animation:clawR .45s ease-in-out infinite alternate; }
@keyframes bob { from { transform:translateY(0) rotate(-3deg); } to { transform:translateY(-3px) rotate(3deg); } }
#beach .bob { transform-origin:50% 90%; animation:bob 2.6s ease-in-out infinite alternate; }
@media (prefers-reduced-motion: reduce) { #beach { display:none; } }
@media print { #beach { display:none; } }

/* ---- Organizer ---- */
.qa { display:grid; gap:8px; margin-bottom:18px; }
.qa input[type=text] { width:100%; padding:14px 16px; border-radius:var(--r); border:1px solid var(--line); background:var(--panel); font-size:16px; }
.qa input[type=text]:focus { border-color:var(--live); outline:none; }
.qa .opts { display:flex; gap:14px; align-items:center; flex-wrap:wrap; min-height:26px; }
.chips { display:flex; gap:6px; flex-wrap:wrap; }
.chip { display:inline-flex; align-items:center; gap:4px; font-size:12px; padding:2px 9px; border-radius:999px; border:1px solid var(--line); background:var(--panel-2); color:var(--ink-2); white-space:nowrap; }
.chip.live { background:var(--live); color:var(--on-live); border-color:transparent; font-weight:700; }
.chip.warn { color:var(--danger); border-color:var(--danger); }
.chip.hs { letter-spacing:.08em; text-transform:uppercase; font-size:10px; font-weight:700; }
.subtabs { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:14px; }
.subtabs button { border:1px solid var(--line); background:none; border-radius:999px; padding:6px 14px; font-weight:500; }
.subtabs button[aria-selected=true] { background:var(--live); color:var(--on-live); border-color:transparent; font-weight:700; }
.subtabs small { opacity:.7; margin-left:4px; }
.plan { display:flex; gap:18px; flex-wrap:wrap; color:var(--ink-3); font-size:13px; margin:-4px 0 12px; }
.plan b { color:var(--ink); font-variant-numeric:tabular-nums; }
.tasks { list-style:none; margin:0; padding:0; display:grid; gap:8px; }
.task { display:flex; gap:12px; align-items:center; background:var(--panel); border:1px solid var(--line); border-radius:var(--r); padding:10px 14px; }
.task.done .ttl { text-decoration:line-through; color:var(--ink-3); }
.task .ttl { font-weight:500; overflow-wrap:anywhere; }
.task .body { flex:1; min-width:0; display:grid; gap:4px; }
.check { width:24px; height:24px; border-radius:50%; border:2px solid var(--ink-3); background:none; flex:none; padding:0; display:grid; place-items:center; font-size:14px; line-height:1; color:var(--on-live); }
.check:hover { border-color:var(--live); }
.check[aria-pressed=true] { background:var(--live); border-color:var(--live); }
.task .acts { display:flex; gap:6px; flex:none; }
.upnext { margin-top:22px; }
.upnext h1 { margin-bottom:10px; }
.f.chk { display:flex; gap:8px; align-items:center; }
dialog textarea, dialog select, dialog input[type=text], dialog input[type=date], dialog input[type=number] { width:100%; padding:9px 10px; border-radius:10px; border:1px solid var(--line); background:var(--panel-2); color:var(--ink); }
@media (max-width:560px) { .task { flex-wrap:wrap; } .task .acts { width:100%; justify-content:flex-end; } }
