/* ioscorner.com free tools and guides (batch 1, 2026-11). Loaded after style.css; uses its tokens.
   A tool page is the app opened in its own ground and ink (like /apps/*.html); the working tool sits on the ground,
   the reading text sits in a .sheet. Forms use sheet colours so they follow light and dark mode. */

/* Relative copy of the Rubik latin face, so the page also renders in the preview folder. Same file as /fonts/. */
@font-face { font-family: 'Rubik'; font-style: normal; font-weight: 400 900; font-display: swap; src: url('../fonts/rubik-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Rubik'; font-style: normal; font-weight: 400 900; font-display: swap; src: url('../fonts/rubik-arabic.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }

.tool-page { --panel: color-mix(in oklab, var(--ink) 9%, transparent); --panel-2: color-mix(in oklab, var(--ink) 15%, transparent); }

/* ------------------------------------------------------------------ hero */
.tool-hero { padding: clamp(16px, 4vh, 40px) 0 0; }
.crumbs { font-size: 0.875rem; opacity: 0.8; }
.crumbs a { text-decoration: underline; text-underline-offset: 0.2em; }
.crumbs:empty { display: none; }
.tool-hero h1 { margin-top: 10px; font: 800 clamp(2.4rem, 5.4vw, 4.6rem)/0.98 var(--display); letter-spacing: -0.035em; text-wrap: balance; max-width: 18ch; }
.tool-hero .lede { max-width: 58ch; }

.panel { margin-top: 28px; padding: clamp(16px, 2.4vw, 26px); border-radius: 30px; background: var(--panel); }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.tgl {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px;
  background: var(--panel-2); color: inherit; font: 650 0.9375rem/1 var(--text);
  transition: background-color 160ms ease, transform 120ms var(--ease-out);
}
.tgl:active { transform: scale(0.96); }
.tgl[aria-pressed="true"] { background: var(--ink); color: var(--ground); }
@media (hover: hover) and (pointer: fine) { .tgl:hover:not([aria-pressed="true"]) { background: color-mix(in oklab, var(--ink) 22%, transparent); } }
.tgl-main { background: var(--ink); color: var(--ground); }
.hint { margin-top: 12px; font-size: 0.875rem; line-height: 1.45; opacity: 0.86; max-width: 70ch; }
.hint:empty { display: none; }

/* ------------------------------------------------------------------ form fields (sheet colours, both themes) */
.form { display: grid; gap: 14px; padding: clamp(18px, 2.6vw, 28px); border-radius: 26px; background: var(--sheet); color: var(--sheet-ink); --focus: var(--blue); box-shadow: 0 24px 50px -36px rgba(0, 0, 0, 0.8); }
.form h2 { font: 700 1.25rem/1.2 var(--display); letter-spacing: -0.015em; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.fld { display: grid; gap: 6px; min-width: 0; }
.fld[hidden] { display: none; }
.fld > span, .fld legend { font-size: 0.875rem; font-weight: 650; color: var(--sheet-ink-2); }
.fld input, .fld select, .fld textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--sheet-line); border-radius: 14px;
  background: var(--sheet-fill); color: var(--sheet-ink); font: 400 1rem/1.3 var(--text);
}
.fld textarea { min-height: 84px; resize: vertical; }
.fld input:focus-visible, .fld select:focus-visible, .fld textarea:focus-visible { outline: 3px solid var(--blue); outline-offset: 1px; border-color: transparent; }
.fld small { font-size: 0.8125rem; color: var(--sheet-ink-2); }
.check { display: flex; align-items: center; gap: 10px; font-size: 0.9375rem; }
.check input { width: 20px; height: 20px; accent-color: var(--blue); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 16px; background: var(--sheet-fill); border: 0; margin: 0; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span { display: block; padding: 9px 14px; border-radius: 12px; font-weight: 650; font-size: 0.9375rem; cursor: pointer; }
.seg input:checked + span { background: var(--sheet); color: var(--blue-ink); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.16); }
.seg input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 1px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px;
  border: 0; border-radius: 999px; background: var(--blue); color: #fff; font: 700 0.9375rem/1 var(--text); text-decoration: none;
  transition: transform 120ms var(--ease-out), filter 160ms ease;
}
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn-quiet { background: var(--sheet-fill); color: var(--sheet-ink); }
@media (hover: hover) and (pointer: fine) { .btn:hover:not([disabled]) { filter: brightness(1.08); } }
.err { color: #c62828; font-size: 0.875rem; font-weight: 600; }
:root[data-theme="dark"] .err { color: #ff8a80; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .err { color: #ff8a80; } }
.privacy-note { display: flex; gap: 10px; align-items: flex-start; font-size: 0.875rem; line-height: 1.45; color: var(--sheet-ink-2); }
.privacy-note .glyph { flex: none; margin-top: 1px; color: #2e7d32; }

/* ------------------------------------------------------------------ the get card (App Store CTA) */
.get-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px 24px; align-items: center;
  margin-top: clamp(56px, 9vh, 96px); padding: clamp(20px, 3vw, 32px); border-radius: 30px; background: var(--panel);
}
.get-card .ico { --s: 72px; }
.get-card h2 { font: 700 clamp(1.4rem, 2.4vw, 1.9rem)/1.1 var(--display); letter-spacing: -0.02em; text-wrap: balance; }
.get-copy > p { margin-top: 8px; max-width: 60ch; line-height: 1.55; opacity: 0.92; }
.get-card .gets { margin-top: 18px; }
.get-fine { margin-top: 10px; font-size: 0.8125rem; opacity: 0.74; }
.get-qr { display: none; width: 132px; text-align: center; }
.get-qr svg { width: 132px; height: 132px; border-radius: 14px; }
.get-qr figcaption { margin-top: 8px; font-size: 0.75rem; line-height: 1.3; opacity: 0.8; }
@media (hover: hover) and (pointer: fine) and (min-width: 900px) { .get-qr { display: block; } }

/* ------------------------------------------------------------------ reading sheet */
.tool-sheet { margin-top: clamp(56px, 9vh, 96px); max-width: 860px; }
.tool-sheet > .group:first-child, .tool-sheet > :first-child { margin-top: 0; }
.tool-sheet h2 { font: 700 clamp(1.35rem, 2.2vw, 1.6rem)/1.2 var(--display); letter-spacing: -0.015em; text-wrap: balance; }
.tool-sheet h3 { font: 650 1.0625rem/1.35 var(--text); margin-top: 18px; }
.tool-sheet .group > p, .tool-sheet .group > ul, .tool-sheet .group > ol, .tool-sheet .group > .tbl, .tool-sheet .group > .callout { margin-top: 12px; }
.tool-sheet p { line-height: 1.65; max-width: 70ch; }
.steps { counter-reset: s; display: grid; gap: 10px; margin-top: 12px; }
.steps > li { counter-increment: s; position: relative; padding-inline-start: 44px; line-height: 1.6; max-width: 68ch; }
.steps > li::before {
  content: counter(s); position: absolute; inset-inline-start: 0; top: 0; display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%; background: var(--sheet-fill); color: var(--blue-ink); font: 700 0.9375rem/1 var(--text);
}
.callout { padding: 14px 18px; border-radius: 18px; background: var(--sheet-fill); line-height: 1.6; }
.callout strong:first-child { display: block; }
.tbl { overflow-x: auto; border-radius: 18px; background: var(--sheet-fill); }
.tbl table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.tbl th, .tbl td { padding: 11px 14px; text-align: start; vertical-align: top; line-height: 1.45; }
.tbl thead th { font-weight: 700; border-bottom: 1px solid var(--sheet-line); }
.tbl tbody tr + tr td, .tbl tbody tr + tr th { border-top: 1px solid var(--sheet-line); }
.tbl tbody th { font-weight: 650; }
.kbd { display: inline-block; padding: 1px 7px; border-radius: 6px; background: var(--sheet-fill); border: 1px solid var(--sheet-line); font: 600 0.8125rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
code { font: 0.9em/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 1px 5px; border-radius: 6px; background: var(--sheet-fill); overflow-wrap: anywhere; }
.disclaimer { margin-top: 28px; font-size: 0.875rem; color: var(--sheet-ink-2); }
.updated { margin-top: 8px; font-size: 0.875rem; color: var(--sheet-ink-2); }

/* ------------------------------------------------------------------ related links */
.related { margin-top: clamp(56px, 9vh, 96px); }
.related h2 { font: 700 clamp(1.5rem, 2.6vw, 2.1rem)/1.05 var(--display); letter-spacing: -0.025em; }
.related ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-top: 20px; }
.related a { display: grid; gap: 4px; height: 100%; padding: 16px 18px; border-radius: 22px; background: var(--panel); text-decoration: none; transition: transform 200ms var(--ease-out), background-color 160ms ease; }
.rel-t { font-weight: 700; }
.rel-d { font-size: 0.875rem; line-height: 1.4; opacity: 0.84; }
@media (hover: hover) and (pointer: fine) { .related a:hover { transform: translateY(-2px); background: var(--panel-2); } }

/* ------------------------------------------------------------------ flip clock */
.fc-stage { display: grid; place-items: center; padding: clamp(18px, 4vw, 40px) clamp(10px, 2vw, 24px); border-radius: 26px; background: #0b0b0d; color: #f4f4f6; position: relative; overflow: hidden; }
.fc { --cw: clamp(52px, 13vw, 150px); display: flex; align-items: center; gap: calc(var(--cw) * 0.08); font: 600 calc(var(--cw) * 1.12)/1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: 0; user-select: none; }
.fc.has-sec { --cw: clamp(36px, 9vw, 110px); }
.fc-group { display: flex; gap: calc(var(--cw) * 0.06); }
.fc [hidden] { display: none !important; }
.fc-sep { display: grid; gap: calc(var(--cw) * 0.32); padding: 0 calc(var(--cw) * 0.04); }
.fc-sep i { width: calc(var(--cw) * 0.12); height: calc(var(--cw) * 0.12); border-radius: 50%; background: currentColor; opacity: 0.7; }
.flip { position: relative; width: var(--cw); height: calc(var(--cw) * 1.42); perspective: calc(var(--cw) * 6); border-radius: calc(var(--cw) * 0.1); }
.flip > span { position: absolute; left: 0; right: 0; height: 50%; overflow: hidden; background: #1d1d22; }
.flip > span b { position: absolute; left: 0; right: 0; height: calc(var(--cw) * 1.42); display: grid; place-items: center; font-weight: 600; }
.flip .ft, .flip .lt { top: 0; border-radius: calc(var(--cw) * 0.1) calc(var(--cw) * 0.1) 0 0; transform-origin: 50% 100%; }
.flip .fb, .flip .lb { bottom: 0; border-radius: 0 0 calc(var(--cw) * 0.1) calc(var(--cw) * 0.1); transform-origin: 50% 0; background: #202026; }
.flip .ft b, .flip .lt b { top: 0; }
.flip .fb b, .flip .lb b { bottom: 0; }
.flip::after { content: ''; position: absolute; left: 0; right: 0; top: calc(50% - 1px); height: 2px; background: #0b0b0d; z-index: 3; }
.flip .lt, .flip .lb { visibility: hidden; z-index: 2; backface-visibility: hidden; }
.flip.go .lt { visibility: visible; animation: fc-top 260ms ease-in both; }
.flip.go .lb { visibility: visible; animation: fc-bot 260ms ease-out 240ms both; }
@keyframes fc-top { from { transform: rotateX(0); } to { transform: rotateX(-90deg); } }
@keyframes fc-bot { from { transform: rotateX(90deg); } to { transform: rotateX(0); } }
@media (prefers-reduced-motion: reduce) { .flip.go .lt, .flip.go .lb { animation: none; visibility: hidden; } }
.fc-ampm { align-self: flex-end; margin-inline-start: calc(var(--cw) * 0.12); font: 700 calc(var(--cw) * 0.24)/1 var(--text); opacity: 0.75; }
.fc-ampm:empty { display: none; }
.fc-date { margin-top: calc(var(--cw) * 0.22); font: 600 clamp(0.95rem, 2.2vw, 1.5rem)/1.2 var(--text); opacity: 0.72; text-align: center; }
.fc-date[hidden] { display: none; }
.fc-wrap { display: grid; justify-items: center; }
.fc-exit { position: absolute; top: max(14px, env(safe-area-inset-top)); right: max(14px, env(safe-area-inset-right)); display: none; height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.14); color: #fff; font: 650 0.875rem/1 var(--text); }
/* Night: red, dim, like StandBy's Night Mode. */
.fc-stage.night { color: #ff3b30; }
.fc-stage.night .flip > span { background: #140404; }
.fc-stage.night .flip .fb, .fc-stage.night .flip .lb { background: #170505; }
.fc-stage.night .fc-wrap { opacity: 0.62; }
/* Light card theme. */
.fc-stage.light { background: #e9e6df; color: #16161a; }
.fc-stage.light .flip > span { background: #fbfaf7; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06); }
.fc-stage.light .flip .fb, .fc-stage.light .flip .lb { background: #f3f1ec; }
.fc-stage.light .flip::after { background: #e9e6df; }
/* Clock only: the stage covers the whole screen (real full screen where the browser allows it). */
.clock-only, .clock-only body { overflow: hidden; }
.clock-only .fc-stage { position: fixed; inset: 0; z-index: 100; border-radius: 0; padding: 0; }
.clock-only .fc { --cw: min(19vw, 52vh); }
.clock-only .fc.has-sec { --cw: min(12.6vw, 48vh); }
.clock-only .fc-stage.show-ui .fc-exit { display: inline-flex; align-items: center; }
.clock-only .fc-stage { cursor: none; }
.clock-only .fc-stage.show-ui { cursor: default; }
@media (orientation: portrait) {
  .clock-only .fc { --cw: 20vw; }
  .clock-only .fc.has-sec { --cw: 13vw; }
}

/* ------------------------------------------------------------------ countdown */
.cd-head { margin-bottom: 16px; font: 700 clamp(1.5rem, 3.6vw, 2.5rem)/1.1 var(--display); letter-spacing: -0.02em; text-wrap: balance; }
.cd[hidden] { display: none; }
.cd { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(8px, 1.6vw, 16px); }
.cd > div { display: grid; justify-items: center; gap: 6px; padding: clamp(14px, 2.4vw, 26px) 6px; border-radius: 24px; background: var(--panel); }
.cd b { font: 700 clamp(2.4rem, 8vw, 5.6rem)/1 var(--display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.cd span { font: 650 clamp(0.8125rem, 1.4vw, 1rem)/1.1 var(--text); opacity: 0.82; }
.cd-target { margin-top: 16px; font: 600 clamp(1rem, 1.8vw, 1.25rem)/1.35 var(--text); }
.cd-also { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 10px; font-size: 0.9375rem; opacity: 0.92; }
.cd-also strong { font-variant-numeric: tabular-nums; }
.cd-done { padding: clamp(18px, 3vw, 30px); border-radius: 24px; background: var(--panel); font: 700 clamp(1.6rem, 4vw, 2.6rem)/1.15 var(--display); }
.cd-done[hidden] { display: none; }
.cd-form { margin-top: 22px; }
.cd-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.cd-quick button { min-height: 38px; padding: 0 14px; border: 1px solid var(--sheet-line); border-radius: 999px; background: var(--sheet-fill); color: var(--sheet-ink); font: 600 0.875rem/1 var(--text); }
.cd-quick button[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.share-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.share-row input { flex: 1 1 260px; min-height: 42px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--sheet-line); background: var(--sheet-fill); color: var(--sheet-ink); font: 0.875rem/1.3 ui-monospace, Menlo, monospace; }
.zones { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin-top: 12px; }
.zones li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--sheet-fill); font-size: 0.9375rem; }
.zones li.past { opacity: 0.6; }
.zones b { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ QR generator */
.qr-tool { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: clamp(16px, 2.4vw, 28px); align-items: start; margin-top: 28px; }
.qr-out { position: sticky; top: 76px; display: grid; gap: 14px; justify-items: center; padding: clamp(18px, 2.6vw, 28px); border-radius: 26px; background: var(--sheet); color: var(--sheet-ink); --focus: var(--blue); box-shadow: 0 24px 50px -36px rgba(0, 0, 0, 0.8); text-align: center; }
.qr-box { width: min(100%, 300px); aspect-ratio: 1; display: grid; place-items: center; border-radius: 18px; background: #fff; }
.qr-box canvas, .qr-box svg { width: 100%; height: 100%; image-rendering: pixelated; border-radius: 18px; }
.qr-empty { padding: 20px; color: #6b6d80; font-size: 0.9375rem; }
.qr-meta { font-size: 0.8125rem; color: var(--sheet-ink-2); }
.qr-out .btn-row { justify-content: center; }
.payload { width: 100%; text-align: start; }
.payload summary { cursor: pointer; font-size: 0.875rem; font-weight: 650; color: var(--sheet-ink-2); }
.payload pre { margin: 8px 0 0; padding: 12px; border-radius: 12px; background: var(--sheet-fill); font: 0.8125rem/1.45 ui-monospace, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 220px; overflow: auto; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-inline-end: 76px; }
.pw-wrap button { position: absolute; inset-inline-end: 6px; top: 6px; height: 34px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--sheet); color: var(--blue-ink); font: 650 0.8125rem/1 var(--text); }

/* Printable Wi-Fi card / business card sheet */
.print-only { display: none; }
@media print {
  body { background: #fff !important; color: #000 !important; padding: 0 !important; }
  .wall, .status, .homebar, .lock, .tool-sheet, .related, .get-card, .tool-hero > *:not(.qr-tool), .qr-tool > .form, .qr-out > *:not(.qr-box):not(.print-only) { display: none !important; }
  .tool-hero, .qr-tool, .qr-out { display: block !important; position: static !important; box-shadow: none !important; background: #fff !important; color: #000 !important; }
  .qr-box { width: 70mm !important; margin: 0 auto; }
  .print-only { display: block !important; margin-top: 8mm; font: 600 14pt/1.4 var(--text); text-align: center; }
}

/* ------------------------------------------------------------------ moon watch calculator */
.mw { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: clamp(16px, 2.4vw, 28px); align-items: start; margin-top: 28px; }
.mw-result { display: grid; gap: 16px; padding: clamp(18px, 2.6vw, 28px); border-radius: 26px; background: var(--panel); }
.mw-big { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.mw-big b { font: 800 clamp(3.4rem, 9vw, 6rem)/0.9 var(--display); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.mw-big span { font: 650 1.125rem/1.2 var(--text); }
.mw-sub { font-size: 1rem; line-height: 1.5; opacity: 0.92; }
.mw-moons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mw-moons figure { display: grid; justify-items: center; gap: 8px; padding: 14px 8px; border-radius: 20px; background: var(--panel); text-align: center; }
.mw-moons svg { width: clamp(72px, 12vw, 110px); height: auto; }
.mw-moons figcaption { font-size: 0.875rem; line-height: 1.35; }
.mw-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; font-size: 0.9375rem; }
.mw-facts dt { opacity: 0.74; font-size: 0.8125rem; }
.mw-facts dd { margin: 2px 0 0; font-weight: 650; font-variant-numeric: tabular-nums; }
.range-row { display: flex; align-items: center; gap: 12px; }
.range-row input[type="range"] { flex: 1; min-height: 32px; padding: 0; border: 0; background: none; accent-color: var(--blue); }
.range-row output { min-width: 4.5em; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 960px) {
  .qr-tool, .mw { grid-template-columns: 1fr; }
  .qr-out { position: static; }
  .get-card { grid-template-columns: auto minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .row2, .row3 { grid-template-columns: 1fr; }
  .cd { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .get-card { grid-template-columns: 1fr; }
  .get-card .ico { --s: 60px; }
  .tool-hero h1 { font-size: clamp(2.1rem, 9.6vw, 2.8rem); }
  .panel { border-radius: 24px; }
  .tgl { min-height: 38px; padding: 0 13px; font-size: 0.875rem; }
  .mw-facts { grid-template-columns: 1fr 1fr; }
}
