/* UtilityCal — one stylesheet, no framework */
:root {
  --ink: #111827;
  --ink-2: #4b5563;
  --ink-3: #6b7280;
  --line: #e5e7eb;
  --bg: #ffffff;
  --bg-2: #f6f7f9;
  --accent: #0b6e4f;
  --accent-ink: #085a40;
  --accent-2: #e7f4ee;
  --warn: #92400e;
  --warn-bg: #fff7e6;
  --bad: #b42318;
  --bad-bg: #fef0ee;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-lg: 0 12px 28px -8px rgba(16, 24, 40, .16), 0 4px 10px -4px rgba(16, 24, 40, .08);
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --h: 152;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.65; font-size: 17px; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-ink); text-decoration-thickness: 2px; }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: 840px; margin: 0 auto; padding: 0 20px; }
.wrap-wide { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: #fff; padding: 8px 12px; z-index: 50; }
.ic { flex: none; vertical-align: -0.2em; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .9); backdrop-filter: saturate(180%) blur(10px); -webkit-backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 17px; color: var(--ink); text-decoration: none; letter-spacing: -0.015em; white-space: nowrap; }
.brand:hover { color: var(--ink); }
.main-nav { display: flex; gap: 4px; margin-left: auto; }
.main-nav a { color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 550; padding: 8px 12px; border-radius: 8px; }
.main-nav a:hover { background: var(--bg-2); color: var(--ink); }
.head-btns { display: none; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer; }
.icon-btn:hover, .icon-btn[aria-expanded="true"] { background: var(--bg-2); }
.icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.menu-toggle .ic-close { display: none; }
.menu-toggle[aria-expanded="true"] .ic-open { display: none; }
.menu-toggle[aria-expanded="true"] .ic-close { display: block; }

/* ---------- search ---------- */
.search { position: relative; flex: 1 1 320px; max-width: 420px; }
.search .search-ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search-input { width: 100%; height: 40px; padding: 0 14px 0 38px; font: inherit; font-size: 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); color: var(--ink); transition: border-color .15s, background .15s, box-shadow .15s; }
.search-input:focus { outline: none; background: #fff; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-2); }
.search-results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); list-style: none; margin: 0; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); max-height: 70vh; overflow: auto; z-index: 40; }
.search-results a { display: block; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--ink); }
.search-results a:hover, .search-results a.active { background: var(--accent-2); }
.search-results .r-t { font-weight: 600; font-size: 15px; }
.search-results .r-c { font-size: 12px; color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-left: 6px; }
.search-results .r-d { display: block; font-size: 13px; color: var(--ink-3); line-height: 1.4; }
.search-results .r-none { padding: 10px; color: var(--ink-3); font-size: 14px; }
.search-hero { max-width: 600px; margin: 26px 0 0; }
.search-hero .search-input { height: 56px; font-size: 17px; padding-left: 48px; border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.search-hero .search-ic { left: 16px; }

/* ---------- type ---------- */
h1 { font-size: 2.2rem; line-height: 1.15; margin: 8px 0 10px; letter-spacing: -0.025em; font-weight: 800; }
h2 { font-size: 1.45rem; line-height: 1.3; margin: 40px 0 12px; letter-spacing: -0.015em; font-weight: 750; }
h3 { font-size: 1.15rem; margin: 26px 0 6px; font-weight: 700; }
.lead { font-size: 1.12rem; color: var(--ink-2); margin: 0; }
.meta { font-size: 14px; color: var(--ink-3); }
.kicker { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin: 0 0 6px; }
.note { font-size: 14px; color: var(--ink-2); }
.fine { font-size: 13px; }

/* ---------- breadcrumbs ---------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 14px; color: var(--ink-3); margin: 20px 0 14px; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }
.crumbs .sep { color: #c0c4cc; }
.crumbs [aria-current] { color: var(--ink-3); }

/* ---------- colored icon tiles ---------- */
.tile { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; border-radius: 12px;
  background: hsl(var(--h) 70% 94%); color: hsl(var(--h) 65% 30%); }
.tile svg { width: 22px; height: 22px; }
.tile-sm { width: 32px; height: 32px; border-radius: 9px; }
.tile-sm svg { width: 18px; height: 18px; }
.tile-lg { width: 52px; height: 52px; border-radius: 14px; }
.tile-lg svg { width: 26px; height: 26px; }
.tile-xl { width: 64px; height: 64px; border-radius: 18px; background: linear-gradient(135deg, hsl(var(--h) 70% 92%), hsl(var(--h) 60% 84%)); }
.tile-xl svg { width: 32px; height: 32px; }

/* ---------- page heads ---------- */
.page-head { display: flex; gap: 18px; align-items: flex-start; margin: 4px 0 20px; }
.page-head h1 { margin-top: 0; }
.hub-head { padding: 22px; border-radius: 18px; background: linear-gradient(135deg, hsl(var(--h) 60% 97%), hsl(var(--h) 50% 93%)); border: 1px solid hsl(var(--h) 40% 88%); }

/* ---------- hero (home) ---------- */
.hero { background: radial-gradient(1000px 400px at 85% -10%, hsl(160 70% 88% / .7), transparent 60%), radial-gradient(800px 360px at -10% 110%, hsl(200 80% 92% / .8), transparent 60%), linear-gradient(180deg, #f3faf7, #fff); border-bottom: 1px solid var(--line); padding: 56px 0 48px; }
.hero .wrap { max-width: 1180px; }
.hero h1 { font-size: clamp(2.3rem, 5vw, 3.5rem); margin: 6px 0 14px; letter-spacing: -0.035em; }
.hero .lead { max-width: 640px; font-size: 1.18rem; }
.trust-row { display: flex; flex-wrap: wrap; gap: 10px 22px; list-style: none; padding: 0; margin: 22px 0 0; font-size: 14px; color: var(--ink-2); font-weight: 550; }
.trust-row li { display: flex; align-items: center; gap: 6px; }
.trust-row .ic { color: var(--accent); }
.section-h { margin-top: 48px; }
.section-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: nowrap; }
.section-row .section-h { min-width: 0; }
.section-row .section-h { margin-bottom: 0; }
.section-row .more { margin: 0; white-space: nowrap; }

/* ---------- cards ---------- */
.cards { list-style: none; padding: 0; margin: 14px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.card a { display: flex; gap: 14px; align-items: flex-start; height: 100%; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-decoration: none; color: var(--ink); background: #fff; box-shadow: var(--shadow); transition: border-color .15s, box-shadow .2s, transform .2s; }
.card a:hover { border-color: hsl(var(--h) 45% 70%); box-shadow: var(--shadow-lg); transform: translateY(-2px); color: var(--ink); }
.card a:hover .tile { background: hsl(var(--h) 65% 40%); color: #fff; }
.card .tile { transition: background .2s, color .2s; }
.card-body { display: flex; flex-direction: column; min-width: 0; }
.card-title { font-weight: 700; font-size: 16px; line-height: 1.3; letter-spacing: -0.01em; }
.card-desc { font-size: 14px; color: var(--ink-2); line-height: 1.5; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cat-cards { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.cat-card a { padding: 20px; }
.pill { display: inline-block; align-self: flex-start; margin-top: 10px; font-size: 12.5px; font-weight: 650; background: hsl(var(--h) 70% 95%); color: hsl(var(--h) 60% 30%); padding: 2px 10px; border-radius: 99px; }
.wrap .cards { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* guide lists (no images) */
.guide-list { list-style: none; padding: 0; margin: 14px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.guide-item a { display: flex; gap: 12px; align-items: flex-start; height: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .2s; }
.guide-item a:hover { border-color: var(--accent); box-shadow: var(--shadow); color: var(--ink); }
.guide-item .gi { color: var(--accent); margin-top: 2px; flex: none; width: 20px; height: 20px; }
.gi-body { display: flex; flex-direction: column; min-width: 0; }
.gi-title { font-weight: 650; line-height: 1.35; }
.guide-item a:hover .gi-title { color: var(--accent); }
.gi-desc { font-size: 14px; color: var(--ink-2); line-height: 1.5; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gi-meta { font-size: 13px; color: var(--ink-3); margin-top: 6px; }
.wrap .guide-list { grid-template-columns: 1fr; }

/* photo cards: home page only (4 latest guides) */
.post-cards { list-style: none; padding: 0; margin: 14px 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.post-card a { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); background: #fff; box-shadow: var(--shadow); transition: box-shadow .2s, transform .2s; }
.post-card a:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); color: var(--ink); }
.post-img { display: block; aspect-ratio: 16 / 9; background: var(--bg-2); overflow: hidden; }
.post-img img { width: 100%; height: 100%; object-fit: cover; }
.post-ph { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: var(--accent); background: linear-gradient(135deg, #e7f4ee, #d6ece3); }
.post-card .card-body { padding: 12px 14px 14px; }
.post-card .card-title { font-size: 15.5px; }
.post-card .meta { margin-top: 6px; font-size: 13px; }
@media (max-width: 1000px) { .post-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .post-cards { grid-template-columns: 1fr; } }

/* guides index: knowledge base layout */
.kb-hero { background: linear-gradient(180deg, #f3faf7, #fff); border-bottom: 1px solid var(--line); padding: 6px 0 40px; }
.kb-hero h1 { font-size: clamp(2.1rem, 4.5vw, 3rem); margin: 6px 0 8px; }
.kb-hero .lead { max-width: 620px; }
.kb-cat { display: flex; align-items: center; gap: 10px; margin: 44px 0 14px; }
.topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.topic { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: var(--shadow); }
.topic-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.topic-head h3 { margin: 0; font-size: 1.08rem; }
.topic-meta { margin: 0; font-size: 13px; color: var(--ink-3); }
.topic-list, .kb-recent { list-style: none; padding: 0; margin: 0; }
.topic-list li a, .kb-recent li a { display: flex; gap: 9px; align-items: flex-start; padding: 7px 0; color: var(--ink); text-decoration: none; line-height: 1.4; font-size: 15.5px; }
.topic-list li + li { border-top: 1px dashed var(--line); }
.topic-list .gi, .kb-recent .gi { color: var(--ink-3); flex: none; margin-top: 2px; }
.topic-list li a:hover, .kb-recent li a:hover { color: var(--accent); }
.topic-list li a:hover .gi, .kb-recent li a:hover .gi { color: var(--accent); }
.topic-tool { margin-top: auto; padding-top: 12px; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 650; text-decoration: none; }
.kb-recent { columns: 2 340px; column-gap: 32px; }
.kb-recent li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; break-inside: avoid; border-bottom: 1px solid var(--line); }
.kb-recent time { font-size: 13px; color: var(--ink-3); white-space: nowrap; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; border: 1px solid hsl(var(--h) 40% 86%); background: hsl(var(--h) 70% 97%); color: hsl(var(--h) 60% 26%); font-size: 14px; font-weight: 600; text-decoration: none; }
.chip:hover { background: hsl(var(--h) 65% 40%); border-color: transparent; color: #fff; }
.jump { margin: 8px 0 10px; }
.cat-section h2 { display: flex; align-items: center; gap: 10px; }
.cat-section h2 a { color: var(--ink); text-decoration: none; }
.cat-section h2 a:hover { color: var(--accent); }
.more { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; text-decoration: none; margin-top: 10px; }
.link-list { padding-left: 20px; }
.link-list li { margin: 6px 0; }

/* ---------- article / prose ---------- */
.prose { font-size: 17.5px; }
.prose p, .prose li { color: #1f2937; }
.prose table { border-collapse: collapse; width: 100%; margin: 18px 0; font-size: 15px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
.prose th { background: var(--bg-2); font-weight: 650; }
.prose tr:nth-child(even) td { background: #fafbfc; }
.prose code { background: var(--bg-2); padding: 1px 6px; border-radius: 5px; font-size: 0.9em; }
.prose blockquote { margin: 18px 0; padding: 12px 18px; border-left: 4px solid var(--accent); background: var(--accent-2); border-radius: 0 10px 10px 0; }
.prose li { margin: 5px 0; }
.prose h2 { padding-top: 6px; }
.post-head { margin-bottom: 18px; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; }
.hero-img { margin: 0 0 22px; }
.hero-img img { width: 100%; border-radius: 16px; aspect-ratio: 16 / 9; object-fit: cover; background: var(--bg-2); }
.hero-img figcaption { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; text-align: right; }
.hero-img figcaption a { color: var(--ink-3); }
.toc { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); padding: 14px 18px; margin: 24px 0; }
.toc-title { margin: 0 0 6px; font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.toc ol { margin: 0; padding-left: 20px; columns: 2 260px; column-gap: 28px; font-size: 15px; }
.toc li { margin: 3px 0; break-inside: avoid; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--accent); text-decoration: underline; }
.cta { display: flex; align-items: center; gap: 14px; border: 1px solid hsl(var(--h) 45% 80%); background: hsl(var(--h) 70% 96%); border-radius: 14px; padding: 14px 18px; margin: 22px 0; }
.cta p { margin: 0; }
.author-box { display: flex; gap: 16px; align-items: flex-start; border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin: 36px 0 0; background: #fff; box-shadow: var(--shadow); }
.author-box .tile { background: none; width: auto; height: auto; }
.author-box p { margin: 0 0 4px; }
.trust { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.trust .ic { color: var(--accent); }
.related { margin-top: 48px; padding-top: 8px; border-top: 1px solid var(--line); }
.other-cats { margin-top: 40px; }

/* ---------- footer ---------- */
.site-footer { margin-top: 80px; background: #0f1a16; color: #b7c4be; padding: 48px 0 28px; font-size: 15px; }
.site-footer a { color: #dfe8e4; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin: 6px 0; }
.footer-h { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #fff; margin: 0 0 10px; }
.brand-footer { color: #fff !important; text-decoration: none !important; margin-bottom: 8px; }
.copyright { border-top: 1px solid #23332d; margin-top: 32px; padding-top: 18px; }

/* ---------- tool widget ---------- */
.tool { position: relative; border: 1px solid var(--line); border-radius: 18px; padding: 26px 26px 24px; background: #fff; margin: 22px 0 10px; box-shadow: inset 0 4px 0 var(--accent), var(--shadow-lg); }
.tool fieldset { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.tool legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.tool .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px 18px; align-items: stretch; }
.tool .grid > label { display: flex; flex-direction: column; row-gap: 6px; }
.tool .grid > label > .hint { order: 3; margin: 0; line-height: 1.4; }
.tool .grid > label > input, .tool .grid > label > select, .tool .grid > label > textarea { order: 2; margin-top: 0; }
/* line the inputs up across a row: title / input / hint share row heights */
@supports (grid-template-rows: subgrid) {
  .tool .grid { row-gap: 0; }
  .tool .grid > label { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 6px; align-content: start; margin-bottom: 18px; }
  .tool .grid > label > input, .tool .grid > label > select, .tool .grid > label > textarea { align-self: end; }
  .tool .grid > label > .hint { align-self: start; }
}
.tool form > p:has(> .btn) { margin: 20px 0 0 !important; }
.tool label { display: block; font-size: 14px; font-weight: 650; color: var(--ink); }
.tool .hint { display: block; font-weight: 400; color: var(--ink-3); font-size: 13px; }
.tool input[type=number], .tool input[type=text], .tool input[type=date], .tool input[type=time], .tool input[type=datetime-local], .tool select, .tool textarea {
  width: 100%; margin-top: 5px; padding: 10px 12px; font: inherit; font-size: 16px; border: 1px solid #d0d5dd; border-radius: 10px; background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.tool textarea { min-height: 160px; line-height: 1.5; resize: vertical; }
.tool input[type=number], .tool input[type=text], .tool input[type=date], .tool input[type=time], .tool input[type=datetime-local], .tool select { height: 46px; line-height: 1.2; }
.tool select { appearance: none; -webkit-appearance: none; padding-right: 38px; font-weight: 400; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; }
.tool input { font-weight: 500; }
.tool input:focus, .tool select:focus, .tool textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-2); }
.seg { display: inline-flex; border: 1px solid #d0d5dd; border-radius: 10px; overflow: hidden; background: #fff; flex-wrap: wrap; }
.seg label { display: flex; align-items: center; gap: 6px; padding: 8px 14px; cursor: pointer; font-weight: 550; border-right: 1px solid #e4e7ec; }
.seg label:last-child { border-right: 0; }
.seg label:has(input:checked) { background: var(--accent-2); color: var(--accent-ink); }
.seg input { accent-color: var(--accent); }
.btn { appearance: none; border: 0; background: var(--accent); color: #fff; font: inherit; font-size: 16px; font-weight: 650; padding: 12px 22px; border-radius: 10px; cursor: pointer; box-shadow: 0 1px 2px rgba(0, 0, 0, .08), inset 0 -2px 0 rgba(0, 0, 0, .12); transition: background .15s, transform .05s; }
.btn:hover { background: var(--accent-ink); }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: #fff; color: var(--accent); border: 1px solid var(--accent); box-shadow: none; }
.btn.secondary:hover { background: var(--accent-2); }
.result { margin-top: 22px; background: #f7fbf9; border: 1px solid #d7ebe2; border-radius: 14px; padding: 20px 22px; animation: pop .25s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.result[hidden] { display: none; }
.big { font-size: clamp(1.6rem, 4vw, 2.1rem); font-weight: 800; color: var(--accent); line-height: 1.2; letter-spacing: -0.02em; }
.result dl { display: grid; grid-template-columns: fit-content(62%) 1fr; margin: 14px 0 0; background: #fff; border: 1px solid #e3eee9; border-radius: 12px; overflow: hidden; }
.result dt, .result dd { padding: 10px 14px; border-top: 1px solid #edf3f0; }
.result dt:first-of-type, .result dd:first-of-type { border-top: 0; }
.result dt { color: var(--ink-2); font-size: 15.5px; }
.result dd { margin: 0; font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; }
.result .math { margin-top: 14px; font-size: 14px; color: var(--ink-2); background: var(--bg-2); border-radius: 10px; padding: 10px 12px; }
.alert { border-radius: 10px; padding: 9px 13px; margin: 8px 0; font-size: 15px; }
.alert.warn { background: var(--warn-bg); color: var(--warn); }
.alert.bad { background: var(--bad-bg); color: var(--bad); }
.alert.ok { background: var(--accent-2); color: var(--accent); }
.meter { height: 14px; border-radius: 99px; background: #e8ebf0; overflow: hidden; margin: 10px 0 4px; }
.meter > span { display: block; height: 100%; background: var(--accent); width: 0; transition: width .3s; }
.meter.warn > span { background: #d58b00; }
.meter.bad > span { background: var(--bad); }
.stock-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 15px; }
.stock-table th, .stock-table td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; }
.stock-table input { width: 70px; padding: 6px 8px; font-size: 15px; border: 1px solid #d0d5dd; border-radius: 6px; }
.stock-table button { background: none; border: 0; color: var(--bad); cursor: pointer; font-size: 18px; }
.add-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.add-row label { flex: 1 1 240px; }
.tool [hidden], .stock-table[hidden] { display: none !important; }
.tool .stock-table input[type=number] { width: 80px; margin: 0; padding: 6px 8px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .header-inner { flex-wrap: wrap; gap: 0 8px; min-height: 60px; padding-top: 9px; padding-bottom: 9px; }
  .head-btns { display: flex; gap: 2px; margin-left: auto; margin-right: -8px; }
  .site-header .search { display: none; order: 3; flex-basis: 100%; max-width: none; margin-top: 8px; }
  .site-header.search-open .search { display: block; }
  .main-nav { display: none; order: 4; flex-basis: 100%; flex-direction: column; gap: 2px; margin: 8px 0 0; padding-top: 8px; border-top: 1px solid var(--line); }
  .site-header.menu-open .main-nav { display: flex; }
  .main-nav a { padding: 12px 10px; font-size: 16px; }
  html { scroll-padding-top: 80px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  h1 { font-size: 1.7rem; }
  .page-head { gap: 12px; }
  .tile-xl { width: 48px; height: 48px; border-radius: 14px; }
  .tile-xl svg { width: 24px; height: 24px; }
  .tool { padding: 18px 16px; border-radius: 14px; }
  .tool .btn { width: 100%; }
  .result { padding: 16px; }
  .result dt, .result dd { padding: 9px 12px; font-size: 15px; }
  .hero { padding: 36px 0 32px; }
  .cards, .cat-cards, .wrap .cards, .guide-list, .topics { grid-template-columns: 1fr; }
  .brand span { font-size: 16px; }
  .more-long { display: none; }
  .section-row .more { font-size: 15px; }
}
@media print {
  .site-header, .site-footer, .related, .toc, .cta { display: none; }
}

/* step-by-step screenshots in articles */
.prose figure.shot { margin: 20px 0 26px; }
.prose figure.shot img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); background: #fff; }
.prose figure.shot figcaption { font-size: 14px; color: var(--ink-3); margin-top: 8px; text-align: center; }
.prose ol.steps > li { margin-bottom: 8px; }
/* row-based calculators (GPA, grade) */
.tool .gpa-row{grid-template-columns:2fr 1fr 1fr 1.3fr;align-items:end}
.tool .gr-row{grid-template-columns:2fr 1fr 1fr;align-items:end}
@media (max-width:600px){.tool .gpa-row{grid-template-columns:1fr 1fr;padding-bottom:10px;border-bottom:1px solid #e3e6ec}.tool .gpa-row label:first-child{grid-column:1/-1}.tool .gr-row{grid-template-columns:1fr 1fr}.tool .gr-row label:first-child{grid-column:1/-1}}
.tool .tc-table td, .tool .tc-table th { padding: 6px 3px; }
.tool .tc-table input[type=time] { width: 100% !important; min-width: 0; padding: 6px 4px; font-size: 14px; }
.tool .tc-table input[type=number] { width: 56px !important; padding: 6px 4px; font-size: 14px; }
@media (max-width: 600px) { .tool .tc-table .tc-h { display: none; } .tool .tc-table { font-size: 13px; } .tool .tc-table input[type=time] { font-size: 13px; } }

/* ---------- Super calculator (graphing, 3D, polar, scientific, solver) */
.tool:has(.sc) { padding: 14px; }
.sc-tabs { display: flex; gap: 4px; overflow-x: auto; margin: 0 0 12px; padding-bottom: 2px; scrollbar-width: none; }
.sc-tabs a { flex: 0 0 auto; padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--ink-2); text-decoration: none; background: var(--bg-2); }
.sc-tabs a:hover { color: var(--ink); background: var(--line); }
.sc-tabs a[aria-current] { background: var(--accent); color: #fff; }
.sc-graph { display: grid; grid-template-columns: 290px 1fr; gap: 12px; align-items: start; }
.sc-side { min-width: 0; }
.sc-stage { position: relative; }
.sc-canvas { display: block; width: 100%; height: 520px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: grab; }
.sc-canvas:active { cursor: grabbing; }
.sc-zoom { position: absolute; top: 10px; right: 10px; display: flex; flex-direction: column; gap: 6px; }
.sc-zoom button { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.95); font-size: 18px; line-height: 1; color: var(--ink); cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.sc-zoom button:hover { background: var(--bg-2); }
.sc-hint { font-size: 12px; color: var(--ink-3); margin-top: 6px; text-align: center; }
.sc-list { display: flex; flex-direction: column; gap: 6px; }
.sc-row { display: grid; grid-template-columns: 26px 1fr 30px; align-items: center; gap: 6px; padding: 5px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.sc-row.bad { border-color: #f1b0ad; }
.tool .sc-row input { height: 38px; padding: 6px 8px; font: 500 15px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; border: 0; box-shadow: none; background: transparent; width: 100%; min-width: 0; }
.tool .sc-row input:focus { box-shadow: none; outline: none; }
.sc-row:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-2); }
.sc-sw { width: 22px; height: 22px; border-radius: 50%; border: 0; cursor: pointer; padding: 0; }
.sc-sw.off { opacity: .2; }
.sc-del { width: 28px; height: 28px; border: 0; background: none; color: var(--ink-3); font-size: 20px; cursor: pointer; border-radius: 6px; }
.sc-del:hover { background: var(--bg-2); color: var(--ink); }
.sc-err { grid-column: 2 / 4; font-size: 12px; color: #b42318; }
.sc-err:empty { display: none; }
.sc-add { margin-top: 8px; width: 100%; padding: 9px; border: 1px dashed var(--line); border-radius: 10px; background: none; color: var(--accent); font-weight: 600; cursor: pointer; }
.sc-add:hover { background: var(--bg-2); }
.sc-params { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.sc-param { display: grid; grid-template-columns: auto 1fr 74px; gap: 8px; align-items: center; font-size: 14px; }
.sc-pn { font: 600 14px ui-monospace, Menlo, monospace; }
.tool .sc-param input[type=number] { height: 32px; padding: 4px 6px; font-size: 13px; }
.sc-param input[type=range] { width: 100%; accent-color: var(--accent); }
.sc-range { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-top: 12px; font-size: 13px; }
.tool .sc-range label { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.tool .sc-range input, .tool .sc-range select { height: 34px; width: 74px; padding: 4px 8px; font-size: 13px; }
.tool .sc-range select { width: auto; padding-right: 30px; }
.sc-help { margin-top: 12px; font-size: 13px; color: var(--ink-2); }
.sc-help summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.sc-help ul { margin: 8px 0 0; padding-left: 18px; }
.sc-help li { margin: 4px 0; }
.sc-help code { font-size: 12px; background: var(--bg-2); padding: 1px 4px; border-radius: 4px; }
/* scientific */
.sc[data-mode=scientific] .sc-app { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 14px; align-items: start; }
.sci { max-width: 520px; width: 100%; margin: 0 auto; }
.sci-screen { position: relative; border-radius: 14px; background: #0f172a; color: #e2e8f0; padding: 26px 16px 14px; margin-bottom: 10px; }
.tool input.sci-in { width: 100%; height: 40px; border: 0; background: transparent; color: #cbd5e1; font: 500 20px ui-monospace, Menlo, monospace; text-align: right; box-shadow: none; padding: 0; }
.tool input.sci-in:focus { box-shadow: none; }
.sci-out { text-align: right; font: 600 34px/1.2 ui-monospace, Menlo, monospace; color: #fff; min-height: 42px; overflow-x: auto; white-space: nowrap; }
.sci-out.pre { color: #94a3b8; }
.sci-out.err { font-size: 15px; color: #fca5a5; white-space: normal; }
.sci-frac { display: block; font-size: 15px; color: #94a3b8; font-weight: 500; }
.sci-flags { position: absolute; top: 8px; left: 14px; display: flex; gap: 8px; font: 700 11px system-ui; color: #38bdf8; letter-spacing: .04em; }
.sci-keys { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; }
.sci-keys .k { height: 50px; border: 1px solid var(--line); border-radius: 10px; background: #f4f6f9; font: 600 16px system-ui, sans-serif; color: var(--ink); cursor: pointer; padding: 0; }
.sci-keys .k:hover { background: #e9edf2; }
.sci-keys .k:active { transform: translateY(1px); }
.sci-keys .k-num { background: #fff; font-size: 19px; }
.sci-keys .k-op { background: #e8f1ff; color: #1d4ed8; font-size: 20px; }
.sci-keys .k-eq { background: var(--accent); border-color: var(--accent); color: #fff; font-size: 22px; }
.sci-keys .k-ac { color: #b42318; }
.sci-keys .k.on { background: #1d4ed8; color: #fff; }
.sci-hist { border: 1px solid var(--line); border-radius: 12px; padding: 10px; max-height: 470px; overflow: auto; }
.sci-hh { display: flex; justify-content: space-between; align-items: center; font-size: 14px; margin-bottom: 6px; }
.sci-clear { border: 0; background: none; color: var(--accent); font-size: 13px; cursor: pointer; }
.sci-list { list-style: none; margin: 0; padding: 0; }
.sci-list button { display: block; width: 100%; text-align: right; border: 0; background: none; padding: 6px 4px; border-bottom: 1px solid var(--bg-2); cursor: pointer; font-family: ui-monospace, Menlo, monospace; }
.sci-list button:hover { background: var(--bg-2); }
.sci-list .he { display: block; font-size: 13px; color: var(--ink-3); overflow-wrap: anywhere; }
.sci-list .hv { display: block; font-size: 15px; font-weight: 600; color: var(--ink); }
/* solver */
.sv-form { display: flex; gap: 8px; }
.tool .sv-in { flex: 1; height: 52px; font: 500 18px ui-monospace, Menlo, monospace; }
.sv-go { flex: 0 0 auto; height: 52px; padding: 0 26px; }
.sv-ex { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; align-items: center; font-size: 13px; color: var(--ink-3); }
.sv-ex .chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 11px; font: 500 13px ui-monospace, Menlo, monospace; color: var(--ink-2); cursor: pointer; }
.sv-ex .chip:hover { border-color: var(--accent); color: var(--accent); }
.sv-out { margin-top: 16px; }
.sv-ans { background: var(--accent-2); border-left: 4px solid var(--accent); border-radius: 10px; padding: 14px 16px; font: 600 20px/1.45 ui-monospace, Menlo, monospace; color: var(--ink); overflow-wrap: anywhere; }
.sv-ans.err { background: #fef3f2; border-color: #f04438; font: 500 15px system-ui, sans-serif; }
.sv-k { display: block; font: 700 12px system-ui, sans-serif; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); margin-bottom: 4px; }
.sv-ans.err .sv-k { color: #b42318; }
.sv-extra p { margin: 8px 0 0; font: 500 15px ui-monospace, Menlo, monospace; color: var(--ink-2); overflow-wrap: anywhere; }
.sv-steps-wrap h3 { font-size: 16px; margin: 18px 0 6px; }
.sv-steps { margin: 0; padding-left: 22px; }
.sv-steps li { margin: 6px 0; font: 14.5px/1.55 ui-monospace, Menlo, monospace; color: var(--ink); overflow-wrap: anywhere; }
.sv-plot { margin-top: 16px; }
.sv-plot .sc-canvas { height: 360px; }
@media (max-width: 900px) {
  .sc-graph { grid-template-columns: 1fr; }
  .sc-stage { order: -1; }
  .sc-canvas { height: 420px; }
  .sc[data-mode=scientific] .sc-app { grid-template-columns: 1fr; }
  .sci-hist { max-height: 260px; }
}
@media (max-width: 560px) {
  .tool:has(.sc) { padding: 10px; margin-left: -6px; margin-right: -6px; }
  .sc-canvas { height: 360px; }
  .sci-keys { gap: 5px; }
  .sci-keys .k { height: 46px; font-size: 15px; }
  .sci-out { font-size: 28px; }
  .sv-form { flex-direction: column; }
  .sv-go { width: 100%; }
}

.btn-more { display: block; margin: 4px auto 0; padding: 10px 20px; border: 1px solid var(--line, #e5e7eb); border-radius: 999px; background: #fff; color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.btn-more:hover { border-color: currentColor; }

/* timers */
.tm-face { background: #fff; border: 1px solid #e4e7ec; border-radius: 16px; padding: 22px 18px; text-align: center; margin: 4px 0 16px; }
.tm-face:fullscreen { display: flex; flex-direction: column; justify-content: center; align-items: center; }
.tm-face:fullscreen .tm-display { font-size: min(24vw, 40vh); }
.tm-display { font-size: clamp(56px, 13vw, 120px); font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.05; color: #101828; }
.tm-display.done { color: #b42318; animation: tm-blink 1s steps(2) 4; }
@keyframes tm-blink { 50% { opacity: .3; } }
.tm-track { height: 6px; background: #eef0f3; border-radius: 3px; overflow: hidden; margin: 14px auto 0; max-width: 520px; }
.tm-bar { height: 100%; width: 0; background: var(--accent); transition: width .25s linear; }
.tm-msg { font-weight: 700; color: #b42318; font-size: 20px; margin: 10px 0 0; }
.tm-buttons { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }
.btn-alt { background: #f2f4f7; color: #101828; box-shadow: inset 0 0 0 1px #d0d5dd; }
.btn-alt:hover { background: #e4e7ec; }
.btn:disabled { opacity: .5; cursor: default; }
.tm-presets { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.tm-presets .chip { cursor: pointer; font-family: inherit; }
.check { display: flex; gap: 8px; align-items: center; margin-top: 12px; font-weight: 500; }
kbd { font: 12px/1 ui-monospace, monospace; border: 1px solid #d0d5dd; border-bottom-width: 2px; border-radius: 4px; padding: 2px 5px; background: #f9fafb; }
.sw-laps tr.best td { color: #067647; font-weight: 650; }
.sw-laps tr.worst td { color: #b42318; }
.sw-laps td, .sw-laps th { font-variant-numeric: tabular-nums; }
.cd-title { font-weight: 650; font-size: 20px; margin: 0 0 12px; }
.cd-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 640px; margin: 0 auto; }
.cd-grid div { background: #f9fafb; border-radius: 12px; padding: 14px 6px; }
.cd-grid span { display: block; font-size: clamp(34px, 8vw, 64px); font-weight: 750; font-variant-numeric: tabular-nums; line-height: 1.1; }
.cd-grid small { color: #475467; font-size: 14px; }
.cd-face.done .cd-grid span { color: #067647; }
.md-ring { --p: 0; width: min(320px, 80vw); aspect-ratio: 1; margin: 0 auto; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--accent) calc(var(--p) * 360deg), #eef0f3 0); }
.md-ring > div { width: 88%; aspect-ratio: 1; border-radius: 50%; background: #fff; display: grid; place-content: center; }
.md-display { font-size: clamp(44px, 11vw, 76px); }
.md-phase { margin: 4px 0 0; color: #475467; font-weight: 600; }
.md-face:fullscreen .md-ring { width: min(70vw, 70vh); }

/* code-ish tools */
.mono, .tool textarea.mono, .tool input.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.big.mono small { font-size: 16px; font-weight: 500; color: #475467; }
.mono-out { white-space: pre-wrap; word-break: break-all; background: #f9fafb; border: 1px solid #e4e7ec; border-radius: 8px; padding: 12px; font: 14px/1.5 ui-monospace, Menlo, Consolas, monospace; max-height: 360px; overflow: auto; }
.copy-mini { font: 600 12px inherit; padding: 3px 8px; border-radius: 6px; border: 1px solid #d0d5dd; background: #fff; cursor: pointer; margin-left: 6px; vertical-align: middle; }
.result dd code { word-break: break-all; }

/* file tools */
.drop { border: 2px dashed #c9ced8; border-radius: 14px; padding: 26px 16px; text-align: center; background: #fcfcfd; margin-bottom: 12px; }
.drop.over { border-color: var(--accent); background: var(--accent-2); }
.drop p { margin: 6px 0; }
.drop label.btn { display: inline-block; }
.ip-list { list-style: none; padding: 0; margin: 0 0 6px; display: grid; gap: 8px; }
.ip-list li { display: flex; align-items: center; gap: 12px; border: 1px solid #e4e7ec; border-radius: 10px; padding: 8px 10px; background: #fff; }
.ip-list img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; background: #f2f4f7; }
.ip-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.ip-name small { display: block; color: #667085; font-weight: 400; }
.ip-act button { border: 1px solid #d0d5dd; background: #fff; border-radius: 6px; width: 32px; height: 32px; cursor: pointer; margin-left: 4px; }
.ip-act button:disabled { opacity: .35; cursor: default; }
.it-preview { max-width: 100%; max-height: 360px; border: 1px solid #e4e7ec; border-radius: 8px; background: repeating-conic-gradient(#f2f4f7 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.cr-stage { text-align: center; margin: 4px 0 14px; }
#cr-canvas { max-width: 100%; touch-action: none; border-radius: 8px; }
.cr-nums { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)) !important; margin-top: 10px; }
.tool input[type=range] { width: 100%; accent-color: var(--accent); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hv-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; }
.hv-bar label.btn { display: inline-block; }
.hv textarea { width: 100%; }
.hv-sizes { display: flex; gap: 8px; margin: 6px 0 10px; }
.hv-sizes .chip { cursor: pointer; font-family: inherit; }
.hv-sizes .chip[aria-pressed=true] { background: hsl(var(--h) 65% 40%); color: #fff; border-color: transparent; }
.hv-stage { background: #f2f4f7; border-radius: 12px; padding: 10px; text-align: center; }
.hv-frame { width: 100%; height: 480px; border: 1px solid #d0d5dd; border-radius: 8px; background: #fff; display: block; margin: 0 auto; max-width: 100%; }
.j-tree { font: 14px/1.6 ui-monospace, Menlo, Consolas, monospace; background: #f9fafb; border: 1px solid #e4e7ec; border-radius: 8px; padding: 10px 12px; max-height: 480px; overflow: auto; }
.j-tree details { padding-left: 16px; }
.j-tree > details { padding-left: 0; }
.j-tree summary { cursor: pointer; color: #475467; }
.j-row { padding-left: 16px; word-break: break-word; }
.j-key { color: #6941c6; } .j-str { color: #067647; } .j-num { color: #175cd3; } .j-bool { color: #b54708; } .j-null { color: #98a2b3; }
.j-out { max-height: 520px; }
.bg-preview { background: #fff; border: 1px solid #e4e7ec; border-radius: 8px; padding: 14px; text-align: center; overflow-x: auto; }
.bg-preview svg { max-width: 100%; height: auto; }
.prose pre { background: #f9fafb; border: 1px solid #e4e7ec; border-radius: 8px; padding: 12px 14px; overflow-x: auto; font: 14px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.prose pre code { background: none; padding: 0; font: inherit; }

/* file-picker labels and download links styled as buttons keep button text colors */
.tool label.btn, .tool a.btn { display: inline-block; color: #fff; font-size: 16px; text-decoration: none; }
.tool label.btn.btn-alt, .tool a.btn.btn-alt { color: #101828; }
.tool label.btn:hover, .tool a.btn:hover { color: #fff; }
.tool label.btn.btn-alt:hover, .tool a.btn.btn-alt:hover { color: #101828; }
