/* TimeFrom theme. One stylesheet, no framework. */
:root {
  --blue: #2563eb;
  --blue-d: #1d4ed8;
  --blue-dd: #1e3a8a;
  --navy: #0a1633;
  --navy-2: #12224a;
  --ink: #0f1b3d;
  --ink-2: #334155;
  --muted: #5b6b85;
  --line: #dfe6f3;
  --line-2: #c9d4e8;
  --bg: #f4f7fd;
  --surface: #fff;
  --sky: #edf3ff;
  --sky-2: #dce8ff;
  --amber: #f59e0b;
  --amber-l: #fff6e5;
  --green: #15803d;
  --red: #b42318;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(10, 22, 51, .06), 0 8px 24px rgba(10, 22, 51, .08);
  --shadow-lg: 0 2px 4px rgba(10, 22, 51, .06), 0 18px 48px rgba(10, 22, 51, .16);
  --display: 'Sora', 'Segoe UI', system-ui, sans-serif;
  --body: 'Figtree', 'Segoe UI', system-ui, -apple-system, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 20px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.65 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--blue-d); text-underline-offset: 3px; }
a:hover { color: var(--blue-dd); }
h1, h2, h3, h4 { font-family: var(--display); color: var(--ink); line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid rgba(37, 99, 235, .45); outline-offset: 2px; }
.muted { color: var(--muted); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border: 0; border-radius: 12px; background: var(--blue); color: #fff; font-weight: 700; text-decoration: none; cursor: pointer; box-shadow: 0 6px 16px rgba(37, 99, 235, .28); transition: background .15s, transform .15s; }
.btn:hover { background: var(--blue-d); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn-ghost { min-height: 40px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: 15px; cursor: pointer; }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue-d); }
.btn-ghost:disabled { opacity: .45; cursor: default; }
.link-btn { background: none; border: 0; padding: 4px 2px; color: var(--blue-d); font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* Top bar and header */
.topbar { background: var(--navy); color: #c7d4f0; font-size: 14px; }
.topbar-row { display: flex; align-items: center; justify-content: space-between; min-height: 38px; gap: 12px; }
.topbar a { color: #c7d4f0; text-decoration: none; }
.topbar a:hover { color: #fff; }
.social { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; }
.social a { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .14); color: #dbe4f7; }
.social a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.social-top a { width: 30px; height: 30px; border: 0; }
.site-header { position: relative; z-index: 40; background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.6) blur(10px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.brand .logo-mark { flex: none; border-radius: 12px; }
.logo-img { flex: none; border-radius: 22%; display: block; }
.brand-name { font: 800 1.2rem/1 var(--display); letter-spacing: -0.03em; color: var(--ink); white-space: nowrap; }
.brand-name span { color: var(--blue); }
.custom-logo { max-height: 48px; width: auto; }
.site-nav { border-top: 1px solid var(--line); background: #fbfcff; }
.nav-list { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2px 4px; list-style: none; margin: 0; padding: 8px 0; }
.nav-list li { display: flex; align-items: center; }
.nav-list li + li::before { content: '»'; color: #a6b4cf; font-size: 14px; margin-right: 4px; }
.nav-list a { display: block; padding: 6px 8px; border-radius: 8px; color: var(--blue-d); font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; }
.nav-list a:hover { background: var(--sky); color: var(--blue-dd); text-decoration: underline; text-underline-offset: 3px; }
.nav-list a[aria-current="page"] { background: var(--blue); color: #fff; text-decoration: none; }
.nav-toggle { display: none; width: 46px; height: 46px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); cursor: pointer; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 20px; height: 2px; margin: 0 auto; background: var(--ink); border-radius: 2px; position: relative; transition: transform .2s; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ''; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; } .nav-toggle-bars::after { top: 6px; }
.nav-open .nav-toggle-bars { background: transparent; }
.nav-open .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

/* Page hero */
.page-hero { position: relative; background: radial-gradient(1200px 380px at 85% -10%, rgba(96, 165, 250, .35), transparent 60%), linear-gradient(135deg, #0a1633 0%, #13307a 55%, #1d4ed8 100%); color: #e6edff; padding: 30px 0 84px; overflow: hidden; }
.page-hero::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .7), transparent); pointer-events: none; }
.page-hero .wrap { position: relative; z-index: 1; }
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4.2vw, 3rem); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 12px; max-width: 20ch; }
.page-hero .lead { font-size: clamp(1.05rem, 1.7vw, 1.2rem); color: #d3defb; max-width: 62ch; margin-bottom: 14px; }
.page-meta { font-size: 14px; color: #a9bcec; margin: 0; }
.page-plain .page-hero, .page-archive .page-hero, .page-sitemap .page-hero, .page-post .page-hero, .page-404 .page-hero { padding-bottom: 44px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 18px; padding: 0; font-size: 14px; }
.crumbs li + li::before { content: '›'; margin-right: 6px; color: #8fa6dd; }
.crumbs a { color: #bccbf3; text-decoration: none; }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.crumbs [aria-current] { color: #fff; }

/* Home hero */
.hero-home { padding: 52px 0 96px; }
.hero-home-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 40px; align-items: center; }
.hero-home h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); max-width: 14ch; }
.hero-clock { padding: 26px 28px; border-radius: 20px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); backdrop-filter: blur(6px); }
.hc-label { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #9fb6ee; }
.hc-time { margin: 0; font: 800 clamp(3rem, 6vw, 4.4rem)/1 var(--display); color: #fff; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 10px; }
.hc-sec { font-size: .34em; font-weight: 700; color: #fbbf24; letter-spacing: 0; }
.hc-date { margin: 12px 0 2px; font-weight: 600; color: #e6edff; }
.hc-zone { margin: 0; font-size: 14px; color: #a9bcec; }

/* Layout */
.page-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 40px; align-items: start; padding-bottom: 56px; }
.entry { min-width: 0; padding-top: 28px; }
.entry > .tool:first-child, .entry > .wp-block-shortcode:first-child > .tool { margin-top: -86px; }
.rail { padding-top: 28px; }
.rail-sticky { position: sticky; top: 20px; display: grid; gap: 18px; }
.page-tool .rail { padding-top: 28px; }
.rail-h { margin: 0 0 10px; font: 700 12px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.toc, .rail-tools { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: 10px; padding: 6px 0; font-size: 14.5px; line-height: 1.35; color: var(--ink-2); text-decoration: none; }
.toc a::before { content: counter(toc, decimal-leading-zero); font: 700 12px/1.6 var(--display); color: var(--blue); }
.toc a:hover { color: var(--blue-d); }
.rail-tools ul { list-style: none; margin: 0; padding: 0; }
.rail-tools a { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 14.5px; color: var(--ink); text-decoration: none; }
.rail-tools a .ico { color: var(--blue); flex: none; }
.rail-tools a:hover span { color: var(--blue-d); text-decoration: underline; }

/* Article typography */
.entry h2 { font-size: clamp(1.45rem, 2.4vw, 1.8rem); margin: 2em 0 .6em; scroll-margin-top: 20px; }
.entry h3 { font-size: 1.2rem; margin: 1.6em 0 .5em; }
.entry > p, .entry > ul > li, .entry > ol > li, .entry details > p { color: var(--ink-2); }
.entry ul, .entry ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.entry li { margin-bottom: .45em; }
.entry li::marker { color: var(--blue); font-weight: 700; }
.entry strong { color: var(--ink); }
.entry > *:first-child:not(.tool):not(.wp-block-shortcode) { margin-top: 0; }
.entry blockquote { margin: 1.5em 0; padding: 14px 20px; border-left: 4px solid var(--blue); background: var(--sky); border-radius: 0 12px 12px 0; }
.entry code { background: var(--sky); padding: 2px 6px; border-radius: 6px; font-size: .92em; }
.entry .formula, .entry pre { background: var(--navy); color: #e6edff; padding: 16px 20px; border-radius: 12px; overflow-x: auto; font: 500 15px/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.entry .callout { margin: 1.5em 0; padding: 16px 20px; border-radius: 14px; background: var(--amber-l); border: 1px solid #fde3ae; color: #5b3d00; }
.entry .callout p { color: inherit; margin: 0; }

/* Data tables */
.table-wrap { margin: 1.4em 0 1.6em; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); -webkit-overflow-scrolling: touch; }
.data { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.data caption { caption-side: top; text-align: left; padding: 14px 16px 4px; font: 700 15px/1.4 var(--display); color: var(--ink); }
.data th, .data td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data thead th { background: var(--sky); color: var(--blue-dd); font-size: 13px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.data tbody tr:last-child > * { border-bottom: 0; }
.data tbody tr:nth-child(even) { background: #fafcff; }
.data tbody th { font-weight: 600; color: var(--ink); }
.table-note { margin: -0.6em 0 1.4em; font-size: 14px; color: var(--muted); }
.table-wrap .table-note { margin: 0; padding: 10px 16px 14px; border-top: 1px solid var(--line); }
.table-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 1.4em 0 0; }
.table-pair .table-wrap { margin: 0; }
.data-grid td:nth-child(odd) { font-weight: 600; color: var(--ink); }
.data-grid td:nth-child(2n) { border-right: 1px solid var(--line); }
.data-grid td:last-child { border-right: 0; }
.mil-chart td:nth-child(3) { border-right: 1px solid var(--line); color: var(--muted); }
.mil-chart td:nth-child(6) { color: var(--muted); }
.mil-chart strong { color: var(--blue-dd); }

/* FAQ (WordPress Details blocks) */
.entry details, .wp-block-details { margin: 0 0 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0; }
.entry details summary { list-style: none; cursor: pointer; padding: 16px 52px 16px 20px; font: 600 1.02rem/1.45 var(--display); color: var(--ink); position: relative; }
.entry details summary::-webkit-details-marker { display: none; }
.entry details summary::after { content: '+'; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 8px; background: var(--sky); color: var(--blue-d); font: 700 18px/26px var(--body); text-align: center; }
.entry details[open] summary::after { content: '−'; }
.entry details > :not(summary) { margin: 0; padding: 0 20px 16px; }
.entry details > p + p { padding-top: 0; }

/* Calculator card */
.tool { position: relative; z-index: 2; margin: 0 0 32px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 24px; }
.tool-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 5px; margin: 0 0 20px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; }
.tool-tabs button { flex: 1 1 auto; min-height: 42px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); font-weight: 600; font-size: 15px; cursor: pointer; }
.tool-tabs button[aria-selected="true"] { background: var(--surface); color: var(--blue-d); box-shadow: 0 1px 3px rgba(10, 22, 51, .12); }
.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; margin-bottom: 14px; }
.tool-grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tool-grid.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.f { display: block; min-width: 0; }
.f-l { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.f-in { position: relative; display: flex; align-items: center; }
.f input, .f select, .f textarea, .hms input, .hms select, .tc-table input { width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--line-2); border-radius: 12px; background: #fff; font-size: 17px; font-variant-numeric: tabular-nums; transition: border-color .15s, box-shadow .15s; }
.f textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.f select, .hms select { appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%231d4ed8' stroke-width='2'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; cursor: pointer; }
.f input:focus, .f select:focus, .f textarea:focus, .hms input:focus, .hms select:focus, .tc-table input:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(37, 99, 235, .15); }
.f-suf { position: absolute; right: 14px; color: var(--muted); font-size: 14px; font-weight: 600; pointer-events: none; }
.f-in input:has(+ .f-suf) { padding-right: 58px; }
.f-note .f-txt { display: block; font-size: 14px; line-height: 1.45; color: var(--muted); padding-top: 4px; }
.f-wide { margin-bottom: 14px; }
.f-stack { display: flex; flex-direction: column; gap: 2px; }
.f-stack .link-btn { align-self: flex-start; }
.f-end { justify-content: flex-end; padding-bottom: 8px; }
.hms { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.hms legend { padding: 0; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.hms-row { display: flex; gap: 10px; align-items: flex-start; }
.hms-sign { flex: 0 0 64px; font-weight: 700; text-align: center; padding-right: 26px !important; background-position: right 10px center !important; }
.hms-f { flex: 1 1 0; min-width: 0; text-align: center; }
.hms-f span { display: block; margin-top: 4px; font-size: 12.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.hms-f input { text-align: center; font-weight: 600; }
.sum-rows .hms { padding: 14px; margin-bottom: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; }
.sum-rows .hms { position: relative; }
.sum-rows .hms legend { margin-bottom: 8px; }
.hms-remove { display: inline-flex; align-items: center; gap: 4px; margin-left: 10px; padding: 2px 10px 2px 8px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 600; line-height: 1.5; vertical-align: middle; cursor: pointer; }
.hms-remove span { font-size: 16px; line-height: 1; }
.hms-remove:hover { border-color: var(--red); color: var(--red); }
.tool-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 4px 0 16px; }
.tool-actions-main { justify-content: center; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: var(--ink-2); cursor: pointer; margin: 2px 0 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--blue); }
.tool-out { margin-top: 6px; padding: 20px 22px; border-radius: 16px; background: linear-gradient(180deg, var(--sky) 0%, #f5f8ff 100%); border: 1px solid var(--sky-2); }
.out-big { margin: 0 0 4px; font: 800 clamp(1.5rem, 3.4vw, 2.1rem)/1.2 var(--display); color: var(--blue-dd); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.out-big.is-error { color: var(--red); font-size: 1.15rem; }
.out-big.is-empty { color: var(--muted); font: 600 1.05rem/1.4 var(--body); letter-spacing: 0; }
.out-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 10px 0 0; }
.out-list:empty { display: none; }
.out-list div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px dashed var(--line-2); }
.out-list dt { color: var(--muted); font-size: 14.5px; }
.out-list dd { margin: 0; font-weight: 700; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tool-hint { margin: 12px 0 0; font-size: 15px; color: var(--muted); }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: -14px 0 32px; }
.share-h { font-weight: 700; font-size: 14px; color: var(--ink-2); }
.share ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.entry .share li { margin: 0; }
.share a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 8px; color: #fff; font-weight: 700; font-size: 14.5px; text-decoration: none; transition: filter .15s, transform .15s; }
.share a:hover { color: #fff; filter: brightness(1.12); transform: translateY(-1px); }
.share-facebook { background: #3b5998; }
.share-x { background: #000; }
.share-pinterest { background: #cb2027; }
.share-email { background: #334155; }
.tool-nojs { margin: 12px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--amber-l); color: #5b3d00; font-size: 15px; }
.now-strip { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin: 0 0 18px; padding: 12px 16px; border-radius: 12px; background: var(--navy); color: #a9bcec; font-size: 14px; }
.now-strip strong { font: 700 1.25rem/1.2 var(--display); color: #fff; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.now-strip-epoch strong { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* Time card table */
.tc-scroll { overflow-x: auto; margin: 0 0 16px; border: 1px solid var(--line); border-radius: 14px; }
.tc-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.tc-table th, .tc-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); }
.tc-table thead th { background: var(--sky); color: var(--blue-dd); font-size: 13px; text-transform: uppercase; letter-spacing: .03em; }
.tc-table tbody th { font-weight: 600; font-size: 15px; white-space: nowrap; }
.tc-table tbody tr:last-child > * { border-bottom: 0; }
.tc-table input { min-height: 42px; padding: 6px 10px; font-size: 16px; }
.tc-table td:nth-child(4) input { max-width: 96px; }
.tc-h { font: 700 1.05rem/1 var(--display); color: var(--blue-dd); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Time zone clocks */
.tz-clocks { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; margin-bottom: 18px; }
.tz-clock { padding: 16px 18px; border-radius: 14px; background: var(--navy); color: #a9bcec; min-width: 0; }
.tz-city { margin: 0 0 2px; font-weight: 700; color: #fff; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tz-time { margin: 0; font: 800 clamp(1.6rem, 3.6vw, 2.2rem)/1.1 var(--display); color: #fff; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.tz-date { margin: 4px 0 0; font-size: 13px; }
.tz-swap { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); color: var(--blue-d); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.tz-swap:hover { border-color: var(--blue); background: var(--sky); }

/* Timer */
.timer-face { position: relative; width: min(300px, 78vw); aspect-ratio: 1; margin: 4px auto 18px; display: flex; align-items: center; justify-content: center; }
.timer-face span { position: relative; z-index: 1; font: 800 clamp(2.6rem, 9vw, 3.6rem)/1 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.timer-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.timer-ring circle { fill: none; stroke: var(--sky-2); stroke-width: 8; }
.timer-ring .tr-fg { stroke: var(--blue); stroke-linecap: round; transition: stroke-dashoffset .25s linear; }
.timer-face.is-done span { color: var(--red); animation: blink 1s steps(2, start) 6; }
.timer-face.is-done .tr-fg { stroke: var(--red); }
@keyframes blink { to { visibility: hidden; } }
.timer-face-watch { aspect-ratio: auto; height: 140px; border-radius: 18px; background: var(--navy); width: 100%; }
.timer-face-watch span { color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0 0 16px; }
.chips button { min-height: 36px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); font-weight: 600; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.chips button:hover { border-color: var(--blue); color: var(--blue-d); background: var(--sky); }
.laps { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow: auto; }
.laps li { display: grid; grid-template-columns: 1fr 1fr 1fr; padding: 8px 4px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.laps li span:first-child { color: var(--muted); }

/* Tool cards */
.related { padding: 56px 0 64px; background: var(--surface); border-top: 1px solid var(--line); }
.related h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin-bottom: 22px; }
.tool-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; list-style: none; margin: 0; padding: 0; }
.tool-card { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto 1fr; column-gap: 14px; height: 100%; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
.tool-card:hover { border-color: var(--blue); box-shadow: var(--shadow); transform: translateY(-2px); }
.tc-ico { grid-row: 1 / 3; width: 44px; height: 44px; border-radius: 12px; background: var(--sky); color: var(--blue-d); display: flex; align-items: center; justify-content: center; }
.tc-name { font: 700 1.02rem/1.3 var(--display); color: var(--ink); margin-bottom: 4px; }
.tc-blurb { font-size: 14.5px; line-height: 1.5; color: var(--muted); }

/* Posts */
.post-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; list-style: none; margin: 32px 0; padding: 0; }
.post-card { display: block; height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; text-decoration: none; }
.post-card img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; display: block; }
.pc-body { display: block; padding: 18px; }
.pc-date { display: block; font-size: 13px; color: var(--muted); }
.pc-title { display: block; font: 700 1.1rem/1.35 var(--display); color: var(--ink); margin: 4px 0 8px; }
.pc-ex { display: block; font-size: 15px; color: var(--ink-2); }
.post-hero img { border-radius: 16px; }
.post-hero { margin: 0 0 24px; }

/* Sitemap page */
.sitemap-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 28px; padding: 36px 20px 64px; }
.sitemap-cols h2 { font-size: 1.1rem; }
.sitemap-cols ul { padding-left: 1.1em; margin: 0; }
.sitemap-cols li { margin-bottom: 6px; }

/* Contact */
.contact-form { max-width: 620px; margin: 1.2em 0 2em; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.contact-form label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; color: var(--ink); }
.contact-form input, .contact-form textarea { width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--line-2); border-radius: 12px; background: #fff; }
.contact-form input:focus, .contact-form textarea:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(37, 99, 235, .15); }
.contact-form .opt { font-weight: 400; color: var(--muted); }
.hp { position: absolute; left: -9999px; }
.form-msg { padding: 12px 14px; border-radius: 12px; font-weight: 600; }
.form-msg-ok { background: #e7f6ec; color: var(--green); }
.form-msg-err { background: #fdecea; color: var(--red); }
.contact-icons { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.contact-icons li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.5; }
.contact-icons svg { flex: none; margin-top: 3px; color: #7ea2ff; }
.contact-page svg { color: var(--blue); }
.search-form { display: flex; gap: 8px; }
.search-form input { flex: 1; min-height: 46px; padding: 0 14px; border: 1.5px solid var(--line-2); border-radius: 12px; }

/* Footer */
.site-footer { background: var(--navy); color: #b8c6e6; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.1fr 1.3fr; gap: 36px; padding-top: 56px; padding-bottom: 44px; }
.footer-about p { margin: 16px 0 18px; line-height: 1.6; }
.brand-footer .brand-name { color: #fff; }
.brand-footer .brand-name span { color: #7ea2ff; }
.footer-h { font: 700 1rem/1.3 var(--display); color: #fff; margin: 4px 0 14px; padding-bottom: 12px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: #d5def3; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-bottom-bar { background: #060f26; }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 18px; padding-bottom: 18px; font-size: 14px; }
.footer-bottom p { margin: 0; }
.legal-links { display: flex; flex-wrap: wrap; gap: 22px; }
.legal-links li { margin: 0; }

/* Responsive */
@media (max-width: 1200px) {
  .nav-list a { font-size: 14px; padding: 6px 6px; }
  .nav-list li + li::before { margin-right: 2px; }
}
@media (max-width: 1080px) {
  .page-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .rail { padding-top: 0; padding-bottom: 8px; }
  .rail-sticky { position: static; grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 920px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .site-nav { display: none; border-top: 1px solid var(--line); background: var(--surface); }
  .nav-open .site-nav { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; flex-wrap: nowrap; padding: 8px 0 14px; gap: 0; }
  .nav-list li { display: block; }
  .nav-list li + li::before { display: none; }
  .nav-list a { padding: 12px 10px; font-size: 16px; border-bottom: 1px solid var(--line); border-radius: 0; color: var(--ink); }
  .nav-list a[aria-current="page"] { border-radius: 10px; }
  .hero-home-grid { grid-template-columns: 1fr; gap: 24px; }
  .tool-grid.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .wrap { padding: 0 16px; }
  .topbar-mail { font-size: 13px; }
  .page-hero { padding: 22px 0 76px; }
  .hero-home { padding: 30px 0 84px; }
  .tool { padding: 18px 16px; border-radius: 18px; }
  .entry > .tool:first-child, .entry > .wp-block-shortcode:first-child > .tool { margin-top: -66px; }
  .tool-grid, .tool-grid.g3, .tool-grid.g4 { grid-template-columns: minmax(0, 1fr); }
  .out-list { grid-template-columns: minmax(0, 1fr); }
  .table-pair { grid-template-columns: 1fr; }
  .rail-sticky { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .tz-clocks { grid-template-columns: 1fr; }
  .tz-swap { justify-self: center; transform: rotate(90deg); }
  .hms-row { gap: 8px; }
  .hms-sign { flex-basis: 56px; }
  .brand-name { font-size: 1.05rem; }
  .brand .logo-mark { width: 36px; height: 36px; }
  .data th, .data td { padding: 9px 11px; }
  .tc-scroll { overflow: visible; border: 0; }
  .tc-table, .tc-table tbody { display: block; min-width: 0; }
  .tc-table thead { display: none; }
  .tc-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 10px; padding: 12px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
  .tc-table tbody th, .tc-table tbody td { padding: 0; border: 0; }
  .tc-table tbody th { grid-column: 1; align-self: center; }
  .tc-table .tc-h { grid-column: 2; grid-row: 1; text-align: right; align-self: center; }
  .tc-table td:nth-child(4) { grid-column: 1 / 3; display: flex; align-items: center; gap: 10px; }
  .tc-table td:nth-child(4)::before { margin: 0; }
  .tc-table td:nth-child(4) input { width: 110px; }
  .tc-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 4px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
  .tc-table input { padding: 6px 10px; font-size: 16px; min-width: 0; width: 100%; }
  .tc-table td { min-width: 0; }
}
@media (max-width: 380px) {
  .brand-name { font-size: .95rem; }
  .brand { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Print: only the time card when "Print time card" is used, otherwise the article. */
@media print {
  .topbar, .site-header, .site-footer, .rail, .related, .crumbs, .tool-actions, .chips, .nav-toggle { display: none !important; }
  body { background: #fff; color: #000; }
  .page-hero { background: none; color: #000; padding: 0 0 12px; }
  .page-hero h1, .page-hero .lead, .page-meta { color: #000; }
  .page-hero::after { display: none; }
  .entry > .tool:first-child { margin-top: 0; }
  .tool { box-shadow: none; border: 1px solid #999; }
  .print-tool .entry > :not(.tool):not(.wp-block-shortcode) { display: none !important; }
  .print-tool .tool:not([data-tool="timecard"]) { display: none !important; }
}

/* Input checks */
.tool input[aria-invalid="true"] { border-color: var(--red) !important; box-shadow: 0 0 0 3px rgba(220, 38, 38, .12); }
.tc-table tr.is-error .tc-h { color: var(--red); font-weight: 700; }
.tc-table tr.is-error input[data-k="brk"] { border-color: var(--red); }
.timer-hint { color: var(--red); text-align: center; }
.tool [role="tab"]:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
