/* The Global Clock — shared site styles */
:root {
  --bg:        #03040a;
  --bg-soft:   #070b16;
  --ink:       #eef2ff;
  --muted:     #8a96b8;
  --muted-2:   #5f6a89;
  --line:      rgba(140, 160, 210, 0.14);
  --line-2:    rgba(140, 160, 210, 0.24);
  --panel:     rgba(12, 17, 33, 0.72);
  --panel-2:   rgba(16, 22, 42, 0.9);
  --cyan:      #4cc9f0;
  --violet:    #7b61ff;
  --pink:      #ff6ec7;
  --gold:      #ffd166;
  --day:       #ffd166;
  --night:     #7b86c8;
  --text-1:    #ffffff;
  --text-2:    #e6ecff;
  --text-3:    #d3dbf0;
  --text-4:    #c5d0ee;
  --NA: #4cc9f0; --SA: #62e8c4; --EU: #7b61ff; --AF: #ff9e5e; --AS: #ff6ec7; --OC: #a9b4ff;
  --shadow: 0 24px 70px rgba(0,0,0,0.5);
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --serif: "Fraunces", Georgia, serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
::selection { background: rgba(76,201,240,0.28); }

/* subtle page starfield background for non-globe pages */
.page-bg {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(1200px 700px at 78% -10%, rgba(76,201,240,0.10), transparent 60%),
    radial-gradient(1000px 700px at 10% 110%, rgba(123,97,255,0.10), transparent 60%),
    var(--bg);
}

/* ---------------- top nav ---------------- */
.nav {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 28px;
  padding: 18px 32px;
  background: linear-gradient(180deg, rgba(6,9,20,0.86), rgba(6,9,20,0.35) 70%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.nav.solid { background: rgba(6,9,20,0.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand .mark { width: 30px; height: 30px; flex: none; }
.brand .mark circle, .brand .mark ellipse, .brand .mark line { vector-effect: non-scaling-stroke; }
.brand .wordmark { font-family: var(--serif); font-weight: 500; font-size: 19px; letter-spacing: -0.01em; line-height: 1; }
.brand .wordmark .the { color: var(--muted); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; display: block; margin-bottom: 3px; font-family: var(--font); font-weight: 600; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  font-size: 13.5px; font-weight: 500; color: var(--muted);
  padding: 8px 14px; border-radius: 9px; transition: color .18s, background .18s;
}
.nav-links a:hover { color: var(--ink); background: rgba(255,255,255,0.05); }
.nav-links a.active { color: var(--ink); background: rgba(76,201,240,0.12); box-shadow: inset 0 0 0 1px rgba(76,201,240,0.25); }

/* nav toggle (mobile) */
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; margin-left: auto; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); margin: 4px 0; border-radius: 2px; }

@media (max-width: 720px) {
  .nav { gap: 12px; padding: 14px 18px; }
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 100%; right: 12px; left: 12px;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px;
    padding: 8px; backdrop-filter: blur(16px); box-shadow: var(--shadow);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
}

/* ---------------- shared UI atoms ---------------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 720px) { .container { padding: 0 18px; } }

.page-head { padding: 46px 0 26px; }
.page-head .eyebrow { font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--cyan); font-weight: 600; margin: 0 0 14px; }
.page-head h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(30px, 4.4vw, 46px); margin: 0; letter-spacing: -0.015em; line-height: 1.03; }
.page-head p { color: var(--muted); font-size: 15.5px; line-height: 1.6; margin: 14px 0 0; max-width: 620px; }

.dn-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.dn-dot.day { background: var(--day); box-shadow: 0 0 10px var(--day); }
.dn-dot.night { background: var(--night); box-shadow: 0 0 9px var(--night); }

.region-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }

.tabnum { font-variant-numeric: tabular-nums; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font-family: var(--font); font-size: 13.5px; font-weight: 600;
  color: var(--ink); background: rgba(255,255,255,0.05);
  border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 16px;
  transition: background .18s, border-color .18s, transform .05s;
}
.btn:hover { background: rgba(255,255,255,0.09); border-color: rgba(150,180,255,0.4); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(180deg, var(--cyan), #33a8d6); color: #04121a; border: 0; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; }

/* search field */
.search {
  display: flex; align-items: center; gap: 11px;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 13px;
  padding: 13px 16px; backdrop-filter: blur(12px);
}
.search svg { flex: none; opacity: 0.6; }
.search input {
  flex: 1; background: none; border: 0; outline: 0; color: var(--ink);
  font-family: var(--font); font-size: 15px;
}
.search input::placeholder { color: var(--muted-2); }

/* toast */
#toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%) translateY(20px);
  background: var(--panel-2); border: 1px solid var(--line-2); color: var(--ink);
  padding: 12px 20px; border-radius: 12px; font-size: 13.5px; font-weight: 500;
  box-shadow: var(--shadow); opacity: 0; pointer-events: none; z-index: 60;
  transition: opacity .25s, transform .25s; backdrop-filter: blur(14px);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.footer { color: var(--muted-2); font-size: 12.5px; padding: 40px 0 34px; border-top: 1px solid var(--line); margin-top: 48px; }
.footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------------- site footer ---------------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 64px; background: linear-gradient(180deg, transparent, rgba(6,9,20,0.6)); padding: 52px 0 30px; }
.site-footer .sf-inner { display: grid; grid-template-columns: 1.2fr 2fr; gap: 40px; }
.site-footer .sf-brand { display: flex; gap: 14px; align-items: flex-start; }
.site-footer .sf-brand .mark { width: 34px; height: 34px; flex: none; }
.site-footer .sf-word { font-family: var(--serif); font-size: 18px; font-weight: 500; margin-bottom: 8px; }
.site-footer .sf-brand p { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 0; max-width: 320px; }
.site-footer .sf-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.site-footer .sf-col h4 { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted-2); margin: 0 0 14px; font-weight: 600; }
.site-footer .sf-col a { display: block; color: var(--muted); font-size: 13.5px; padding: 5px 0; transition: color .15s; }
.site-footer .sf-col a:hover { color: var(--ink); }
.site-footer .sf-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 12px; }
@media (max-width: 980px) {
  .site-footer .sf-inner { grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width: 760px) {
  .site-footer .sf-cols { grid-template-columns: repeat(2, 1fr); }
}

/* ---------------- cookie consent ---------------- */
.consent {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 70; max-width: 720px; margin: 0 auto;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 16px;
  padding: 16px 20px; box-shadow: var(--shadow); backdrop-filter: blur(16px);
  transform: translateY(140%); transition: transform .35s cubic-bezier(.22,.61,.36,1);
}
.consent.show { transform: translateY(0); }
.consent p { margin: 0; font-size: 13px; color: var(--text-4); line-height: 1.55; flex: 1; min-width: 240px; }
.consent p a { color: var(--cyan); text-decoration: underline; text-underline-offset: 2px; }
.consent-btns { display: flex; gap: 9px; }
.consent .btn { padding: 9px 18px; }

/* ---------------- ad slots ---------------- */
.ad-slot { display: block; margin: 30px 0; text-align: center; }
.ad-slot .ad-label { display: block; font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 8px; }
.ad-slot .ad-box {
  display: flex; align-items: center; justify-content: center; color: var(--muted-2); font-size: 12px;
  border: 1px dashed var(--line-2); border-radius: 12px; min-height: 96px; background: rgba(255,255,255,0.015);
}
.ad-slot.in-article .ad-box { min-height: 120px; }
.ad-slot.leaderboard .ad-box { min-height: 90px; max-width: 728px; margin: 0 auto; }

/* ---------------- content / article pages ---------------- */
.content { max-width: 760px; margin: 0 auto; padding: 0 32px; }
.content-wide { max-width: 1080px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 720px) { .content, .content-wide { padding: 0 20px; } }

.crumbs { font-size: 12.5px; color: var(--muted); padding: 30px 0 0; display: flex; gap: 8px; align-items: center; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--ink); }
.crumbs .sep { color: var(--muted-2); }

.article-head { padding: 20px 0 26px; border-bottom: 1px solid var(--line); margin-bottom: 34px; }
.article-head .cat { font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--cyan); font-weight: 600; margin: 0 0 16px; }
.article-head h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(30px, 4.4vw, 46px); line-height: 1.06; letter-spacing: -0.015em; margin: 0; }
.article-head .meta { display: flex; gap: 14px; align-items: center; color: var(--muted); font-size: 13px; margin-top: 18px; }
.article-head .meta .dot { color: var(--muted-2); }

.prose { font-size: 16.5px; line-height: 1.75; color: var(--text-3); }
.prose > p:first-of-type { font-size: 18px; color: var(--text-2); }
.prose h2 { font-family: var(--serif); font-weight: 500; font-size: 26px; color: var(--text-1); margin: 40px 0 14px; letter-spacing: -0.01em; }
.prose h3 { font-size: 18px; font-weight: 600; color: var(--text-1); margin: 28px 0 10px; }
.prose p { margin: 0 0 18px; }
.prose a { color: var(--cyan); text-decoration: underline; text-underline-offset: 2px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 22px; }
.prose li { margin: 0 0 9px; }
.prose strong { color: var(--text-1); }
.prose blockquote { margin: 24px 0; padding: 14px 20px; border-left: 3px solid var(--cyan); background: rgba(76,201,240,0.06); border-radius: 0 12px 12px 0; color: var(--text-2); font-size: 16px; }
.prose .callout { margin: 24px 0; padding: 18px 20px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--panel); }
.prose .callout h3 { margin-top: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: 14.5px; }
.prose th, .prose td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); }
.prose th { color: var(--muted); font-weight: 600; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
.prose td { color: var(--text-3); }

.article-cta { margin: 36px 0; padding: 22px 24px; border: 1px solid rgba(76,201,240,0.3); background: rgba(76,201,240,0.06); border-radius: 16px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.article-cta .txt { flex: 1; min-width: 220px; }
.article-cta h3 { margin: 0 0 5px; font-size: 17px; color: var(--text-1); }
.article-cta p { margin: 0; color: var(--muted); font-size: 13.5px; }

.related { margin: 44px 0 10px; }
.related h2 { font-family: var(--serif); font-weight: 500; font-size: 22px; margin: 0 0 18px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.rel-card { display: block; padding: 18px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); transition: border-color .15s, transform .06s; }
.rel-card:hover { border-color: var(--line-2); }
.rel-card .rc-cat { font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--cyan); font-weight: 600; }
.rel-card .rc-title { font-weight: 600; font-size: 15px; margin-top: 8px; line-height: 1.35; }

/* learn hub cards */
.learn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; padding-bottom: 10px; }
.learn-card { display: flex; flex-direction: column; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); transition: border-color .16s, transform .07s, background .16s; }
.learn-card:hover { border-color: var(--line-2); background: rgba(16,22,42,0.8); transform: translateY(-2px); }
.learn-card .lc-cat { font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--cyan); font-weight: 600; }
.learn-card h3 { font-family: var(--serif); font-weight: 500; font-size: 21px; line-height: 1.15; margin: 12px 0 10px; }
.learn-card p { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0 0 18px; flex: 1; }
.learn-card .lc-read { font-size: 12.5px; color: var(--muted-2); display: flex; align-items: center; gap: 8px; }
.learn-card .lc-read .arrow { color: var(--cyan); transition: transform .15s; }
.learn-card:hover .lc-read .arrow { transform: translateX(3px); }

/* simple info cards for about/contact */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 26px 0; }
.info-card { padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.info-card .ic-k { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted-2); font-weight: 600; margin-bottom: 10px; }
.info-card .ic-v { font-size: 15px; color: var(--text-2); line-height: 1.5; }
.info-card .ic-v a { color: var(--cyan); }

/* ---------------- calculators / tools ---------------- */
.tool-hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; padding-bottom: 10px; }
.tool-card { display: flex; flex-direction: column; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); transition: border-color .16s, transform .07s, background .16s; }
.tool-card:hover { border-color: var(--line-2); background: rgba(16,22,42,0.8); transform: translateY(-2px); }
.tool-card .tc-ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: rgba(76,201,240,0.12); border: 1px solid rgba(76,201,240,0.25); margin-bottom: 18px; }
.tool-card .tc-ic svg { width: 24px; height: 24px; color: var(--cyan); }
.tool-card h3 { font-family: var(--serif); font-weight: 500; font-size: 21px; margin: 0 0 9px; }
.tool-card p { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0 0 18px; flex: 1; }
.tool-card .tc-go { font-size: 12.5px; color: var(--muted-2); display: flex; align-items: center; gap: 8px; }
.tool-card .tc-go .arrow { color: var(--cyan); transition: transform .15s; }
.tool-card:hover .tc-go .arrow { transform: translateX(3px); }

.calc-card { background: var(--panel); border: 1px solid var(--line-2); border-radius: 20px; padding: 28px; }
.calc-card + .calc-card { margin-top: 20px; }
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.field input, .field select {
  background: rgba(255,255,255,0.05); border: 1px solid var(--line-2); border-radius: 11px;
  padding: 13px 14px; color: var(--ink); font: 500 15px var(--font); width: 100%;
  font-variant-numeric: tabular-nums; color-scheme: dark;
}
.field input:focus, .field select:focus { outline: none; border-color: rgba(76,201,240,0.5); background: rgba(76,201,240,0.06); }

.result-hero { text-align: center; padding: 30px 20px; border: 1px solid rgba(76,201,240,0.28); background: rgba(76,201,240,0.06); border-radius: 18px; margin-top: 22px; }
.result-hero .rh-label { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--cyan); font-weight: 600; margin-bottom: 12px; }
.result-hero .rh-value { font-family: var(--serif); font-weight: 500; font-size: clamp(28px, 5vw, 44px); line-height: 1.1; color: var(--text-1); letter-spacing: -0.01em; }
.result-hero .rh-value .num { font-variant-numeric: tabular-nums; }
.result-hero .rh-sub { color: var(--muted); font-size: 14px; margin-top: 12px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 20px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 17px; }
.stat .s-k { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-2); font-weight: 600; margin-bottom: 8px; }
.stat .s-v { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text-2); line-height: 1.1; }
.stat .s-v.small { font-size: 16px; }

/* timesheet rows */
.ts-table { width: 100%; }
.ts-row { display: grid; grid-template-columns: 1.1fr 1fr 1fr 0.8fr 0.9fr 36px; gap: 10px; align-items: center; padding: 8px 0; }
.ts-row.head { color: var(--muted); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; padding-bottom: 4px; }
.ts-row input { background: rgba(255,255,255,0.05); border: 1px solid var(--line-2); border-radius: 9px; padding: 10px 10px; color: var(--ink); font: 500 14px var(--font); width: 100%; color-scheme: dark; font-variant-numeric: tabular-nums; }
.ts-row input:focus { outline: none; border-color: rgba(76,201,240,0.5); }
.ts-row .ts-total { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text-2); text-align: right; font-size: 15px; }
.ts-row .ts-x { background: none; border: 0; color: var(--muted-2); cursor: pointer; font-size: 17px; border-radius: 7px; padding: 4px; }
.ts-row .ts-x:hover { color: #ff8a8a; background: rgba(255,255,255,0.06); }
.ts-grand { display: flex; align-items: baseline; justify-content: flex-end; gap: 14px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.ts-grand .g-label { color: var(--muted); font-size: 13px; }
.ts-grand .g-val { font-size: 30px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text-1); }
.ts-grand .g-dec { color: var(--muted); font-size: 14px; }
@media (max-width: 640px) {
  .ts-row { grid-template-columns: 1fr 1fr; gap: 8px; position: relative; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .ts-row.head { display: none; }
  .ts-row .ts-total { grid-column: 1 / -1; text-align: left; }
  .ts-row .ts-x { position: absolute; top: 10px; right: 0; }
  .ts-row .ts-cell-label { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted-2); margin-bottom: 5px; }
}
.ts-cell-label { display: none; }

/* calendar */
.cal-shell { max-width: 760px; margin: 0 auto; }
.cal-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 14px; }
.cal-title { font-family: var(--serif); font-weight: 500; font-size: 26px; }
.cal-title .yr { color: var(--muted); }
.cal-nav { display: flex; gap: 8px; align-items: center; }
.cal-nav button { width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line-2); background: rgba(255,255,255,0.05); color: var(--ink); cursor: pointer; font-size: 17px; transition: .15s; }
.cal-nav button:hover { background: rgba(255,255,255,0.1); }
.cal-nav .today-btn { width: auto; padding: 0 16px; font: 600 13px var(--font); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { text-align: center; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2); font-weight: 600; padding: 8px 0; }
.cal-cell { aspect-ratio: 1 / 1; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; transition: border-color .14s, background .14s; position: relative; }
.cal-cell:hover { border-color: var(--line-2); background: rgba(16,22,42,0.9); }
.cal-cell.other { opacity: 0.32; }
.cal-cell .d { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cal-cell.today { border-color: var(--cyan); background: rgba(76,201,240,0.12); box-shadow: inset 0 0 0 1px rgba(76,201,240,0.4); }
.cal-cell.today .d { color: var(--cyan); }
.cal-cell.sel { outline: 2px solid var(--text-1); outline-offset: -2px; }
.cal-cell .wk { position: absolute; top: 4px; left: 6px; font-size: 9px; color: var(--muted-2); }
@media (max-width: 560px) { .cal-cell .d { font-size: 13px; } .cal-grid { gap: 4px; } .cal-cell { border-radius: 9px; } }
.cal-info { margin-top: 22px; }

/* city comparison pages */
.cmp-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 8px 0 22px; }
.cmp-clock { background: var(--panel); border: 1px solid var(--line-2); border-radius: 18px; padding: 22px 20px; text-align: center; }
.cmp-clock .cc-city { font-family: var(--serif); font-weight: 500; font-size: 20px; }
.cmp-clock .cc-city a { color: inherit; }
.cmp-clock .cc-city a:hover { color: var(--cyan); }
.cmp-clock .cc-t { font-size: clamp(32px, 7vw, 46px); font-weight: 600; font-variant-numeric: tabular-nums; margin: 12px 0 8px; line-height: 1; }
.cmp-clock .cc-t .sec { font-size: 0.45em; color: var(--muted); } .cmp-clock .cc-t .ap { font-size: 0.34em; color: var(--muted); font-weight: 600; }
.cmp-clock .cc-d { font-size: 13px; color: var(--muted); }
.cmp-clock .cc-o { font-size: 12px; color: var(--text-1); font-weight: 600; margin-top: 6px; font-variant-numeric: tabular-nums; }
.cmp-diff { text-align: center; font-size: clamp(17px, 3.2vw, 22px); color: var(--text-2); padding: 20px; border: 1px solid rgba(76,201,240,0.28); background: rgba(76,201,240,0.06); border-radius: 16px; margin-bottom: 8px; }
.cmp-diff strong { color: var(--text-1); }
@media (max-width: 520px) { .cmp-pair { grid-template-columns: 1fr; } }




/* ================= theme toggle + light theme ================= */
.theme-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(140,160,210,0.08); color: var(--ink); cursor: pointer; display: grid; place-items: center; transition: background .16s, border-color .16s; flex: none; }
.theme-btn:hover { border-color: rgba(150,180,255,0.4); background: rgba(140,160,210,0.16); }
.theme-btn svg { width: 18px; height: 18px; }
@media (max-width: 720px) { .theme-btn { width: 34px; height: 34px; } }

html[data-theme="light"] {
  --bg: #eef1f8; --bg-soft: #ffffff; --ink: #17203a; --muted: #5a657f; --muted-2: #8b95ad;
  --line: rgba(20,30,60,0.12); --line-2: rgba(20,30,60,0.22);
  --panel: rgba(255,255,255,0.78); --panel-2: rgba(255,255,255,0.97);
  --text-1: #0c1428; --text-2: #1a2440; --text-3: #33405f; --text-4: #465477;
  --shadow: 0 20px 50px rgba(30,45,90,0.14);
}
html[data-theme="light"] .page-bg { background:
  radial-gradient(1200px 700px at 78% -10%, rgba(76,201,240,0.12), transparent 60%),
  radial-gradient(1000px 700px at 10% 110%, rgba(123,97,255,0.10), transparent 60%),
  var(--bg); }
html[data-theme="light"] .nav.solid { background: rgba(255,255,255,0.9); border-bottom: 1px solid var(--line); }
html[data-theme="light"] .site-footer { background: linear-gradient(180deg, transparent, rgba(20,30,60,0.04)); }
html[data-theme="light"] .nav-links a:hover { background: rgba(20,30,60,0.05); }
html[data-theme="light"] .btn:hover, html[data-theme="light"] .cbtn:hover { background: rgba(20,30,60,0.05); }
html[data-theme="light"] .theme-btn { background: rgba(20,30,60,0.05); }
html[data-theme="light"] ::selection { background: rgba(76,201,240,0.22); }

/* light-mode hover fixes — the base styles use dark hover backgrounds that must not apply on light */
html[data-theme="light"] .ccard:hover,
html[data-theme="light"] .tool-card:hover,
html[data-theme="light"] .learn-card:hover,
html[data-theme="light"] .cal-cell:hover,
html[data-theme="light"] .bcard:hover,
html[data-theme="light"] .rel-card:hover,
html[data-theme="light"] .rcard:hover {
  background: rgba(76,201,240,0.07); border-color: rgba(76,201,240,0.35);
}
html[data-theme="light"] .ac-item:hover,
html[data-theme="light"] .ac-item.active,
html[data-theme="light"] .cal-nav button:hover,
html[data-theme="light"] .bc-x:hover,
html[data-theme="light"] .ts-row .ts-x:hover,
html[data-theme="light"] .spin button:hover,
html[data-theme="light"] .daystep button:hover { background: rgba(20,30,60,0.06); }
html[data-theme="light"] .chip-link:hover { background: rgba(76,201,240,0.08); }
