/* Tell Time — Interactive Clock styles.
   Fonts trimmed to latin + latin-ext subsets only (no devanagari/vietnamese/hebrew).
   Extracted from the original Claude-artifact bundle. */

/* Baloo 2 — used for headings + logo (weights 700, 800) */
@font-face {
  font-family: 'Baloo 2';
  font-style: normal;
  font-weight: 700 800;
  font-display: swap;
  src: url("tell-time-assets/baloo2-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: 'Baloo 2';
  font-style: normal;
  font-weight: 700 800;
  font-display: swap;
  src: url("tell-time-assets/baloo2-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* DM Mono — used for digital readout + preset labels (weight 500) */
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("tell-time-assets/dmmono-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: 'DM Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("tell-time-assets/dmmono-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Fredoka — body text (weights 500, 600, 700) */
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 500 700;
  font-stretch: 100%;
  font-display: swap;
  src: url("tell-time-assets/fredoka-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: 'Fredoka';
  font-style: normal;
  font-weight: 500 700;
  font-stretch: 100%;
  font-display: swap;
  src: url("tell-time-assets/fredoka-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root{
  --cream:#FBF3DE;
  --cream-2:#F4E7C5;
  --ink:#1E2A4A;
  --ink-2:#2B4C7E;
  --sky:#BFE0F5;
  --sky-2:#86C4E8;
  --sky-3:#E9F4FB;
  --hour:#E63946;
  --minute:#2E6FD6;
  --yellow:#F6C445;
  --green:#4FA96A;
  --chip:#FFFFFF;
  --shadow: 0 2px 0 rgba(30,42,74,.08), 0 10px 30px rgba(30,42,74,.08);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;background:var(--cream);color:var(--ink);font-family:'Fredoka',system-ui,sans-serif;-webkit-font-smoothing:antialiased}
body{min-height:100vh;overflow-x:hidden}
.app{max-width:1180px;margin:0 auto;padding:28px 28px 80px}

/* ---------- SEO shell (above-the-fold copy) ---------- */
.seo-intro{max-width:1180px;margin:0 auto;padding:28px 28px 0}
.seo-intro h1{font-family:'Baloo 2',system-ui,sans-serif;font-weight:800;font-size:34px;letter-spacing:-.5px;margin:0 0 8px 0;line-height:1.15}
.seo-intro .lede{font-size:17px;color:#3a4466;max-width:760px;line-height:1.55;margin:0 0 14px 0}
.seo-intro .crumbs{font-size:13px;color:#6b7794;margin-bottom:12px}
.seo-intro .crumbs a{color:#2B4C7E;text-decoration:none}
.seo-intro .crumbs a:hover{text-decoration:underline}
.seo-intro .badges{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:10px}
.seo-intro .badge{background:#fff;border:1px solid #eadfb8;border-radius:999px;padding:4px 12px;font-size:13px;color:#2B4C7E;font-weight:600}

/* ---------- Header ---------- */
.topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px;flex-wrap:wrap}
.brand{display:flex;align-items:center;gap:12px}
.brand .logo{width:46px;height:46px;border-radius:14px;background:var(--ink);display:grid;place-items:center;color:var(--cream);font-family:'Baloo 2';font-weight:800;font-size:22px;letter-spacing:-.5px;box-shadow:var(--shadow)}
.brand h2.app-title{margin:0;font-family:'Baloo 2';font-weight:800;font-size:22px;letter-spacing:-.5px}
.brand .sub{margin:0;font-size:14px;color:#5b6685;letter-spacing:.02em}

.modes{display:flex;gap:6px;background:#fff;padding:5px;border-radius:999px;box-shadow:var(--shadow);border:1px solid #eadfb8}
.modes button{border:0;background:transparent;padding:9px 16px;border-radius:999px;font-family:'Fredoka';font-weight:600;font-size:14px;color:#5b6685;cursor:pointer}
.modes button.on{background:var(--ink);color:var(--cream)}

/* ---------- Layout ---------- */
.grid{display:grid;grid-template-columns: 1.25fr .9fr;gap:26px;align-items:start}
@media (max-width: 920px){ .grid{grid-template-columns:1fr} }

.card{background:#fff;border-radius:22px;padding:22px;box-shadow:var(--shadow);border:1px solid #eadfb8}
.card h2{margin:0 0 10px 0;font-family:'Baloo 2';font-weight:700;font-size:18px;letter-spacing:-.2px}

/* ---------- Clock ---------- */
.clockwrap{position:relative;aspect-ratio:1/1;width:100%;touch-action:none;user-select:none}
.clockwrap svg{width:100%;height:100%;display:block;cursor:grab}
.clockwrap svg:active{cursor:grabbing}
/* Read mode: clock is observe-only, no grab cursor */
.clockwrap.readonly svg,.clockwrap.readonly svg:active{cursor:default}

/* ---------- Digital readout ---------- */
.readout{display:flex;align-items:stretch;gap:10px;justify-content:center;margin-bottom:10px}
.rotile{background:var(--ink);color:#fff;border-radius:18px;padding:14px 10px;min-width:96px;text-align:center;box-shadow:var(--shadow);position:relative}
.rotile.min{background:var(--minute)}
.rotile.hr{background:var(--hour)}
.rotile .n{font-family:'DM Mono',monospace;font-weight:500;font-size:54px;line-height:1;letter-spacing:-.02em}
.rotile .l{margin-top:6px;font-size:12px;opacity:.85;letter-spacing:.14em;text-transform:uppercase;font-weight:600}
.colon{font-family:'DM Mono';font-weight:500;font-size:54px;align-self:center;color:var(--ink);opacity:.35}
.spoken{text-align:center;font-size:17px;color:#3a4466;margin-top:6px}
.spoken b{color:var(--hour)}
.spoken i{color:var(--minute);font-style:normal}

/* ---------- Controls ---------- */
.row{display:flex;flex-wrap:wrap;gap:8px}
.btn{border:1px solid #eadfb8;background:#fff;color:var(--ink);padding:10px 14px;border-radius:12px;font-family:'Fredoka';font-weight:600;font-size:14px;cursor:pointer;transition:transform .08s ease, background .15s}
.btn:hover{background:var(--cream-2)}
.btn:active{transform:translateY(1px)}
.btn.primary{background:var(--ink);border-color:var(--ink);color:#fff}
.btn.primary:hover{background:#2c3a66}
.btn.ghost{background:transparent}
.preset{min-width:72px;text-align:center;font-family:'DM Mono';font-weight:500}

/* Legend */
.legend{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px}
.legend > div{display:flex;align-items:center;gap:10px;background:var(--cream);border-radius:12px;padding:10px 12px;border:1px solid #eadfb8}
.legend .bar{width:26px;height:6px;border-radius:3px}
.legend b{font-family:'Baloo 2';font-size:15px}
.legend small{display:block;color:#5b6685;font-size:12px;margin-top:2px}

/* Quiz */
.quiz-opts{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-bottom:10px}
.quiz-opts-label{font-size:12px;color:#5b6685;font-weight:600;letter-spacing:.04em;text-transform:uppercase}
.btn.small{padding:6px 10px;font-size:12px;border-radius:8px}
.quiz-hint{font-size:13px;color:#5b6685;background:#FFF8E1;border:1px solid #f1d98a;border-radius:10px;padding:8px 12px;margin-bottom:10px;line-height:1.4}
.quiz-hint b{color:var(--ink-2)}
.quiz-target{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;background:var(--cream);border:1px dashed #d9c98c;border-radius:16px;margin-bottom:10px}
.quiz-target .t{font-family:'Baloo 2';font-weight:700;font-size:22px}
.quiz-target .t span.big{font-family:'DM Mono';font-weight:500;color:var(--ink-2)}
.quiz-feedback{min-height:24px;margin-top:8px;font-weight:600}
.quiz-feedback.ok{color:var(--green)}
.quiz-feedback.no{color:var(--hour)}
.score{font-family:'DM Mono';font-weight:500;color:#5b6685;font-size:13px}

/* Read-mode digital picker — twin tiles styled to mirror the .readout.
   Native <select> on mobile shows a wheel/sheet picker — no keyboard. */
.read-inputs{display:flex;align-items:stretch;gap:10px;justify-content:center;margin:8px 0 4px}
.read-tile{background:var(--ink);color:#fff;border-radius:18px;padding:10px 8px;min-width:104px;text-align:center;box-shadow:var(--shadow);position:relative;display:flex;flex-direction:column;align-items:center;gap:4px;cursor:pointer}
.read-tile.hr{background:var(--hour)}
.read-tile.min{background:var(--minute)}
.read-tile-l{font-size:11px;opacity:.85;letter-spacing:.14em;text-transform:uppercase;font-weight:600;order:2}
.read-tile select{
  order:1;width:100%;
  background:transparent;border:0;
  color:#fff;
  font-family:'DM Mono',monospace;font-weight:500;font-size:48px;line-height:1;letter-spacing:-.02em;
  text-align:center;text-align-last:center;
  outline:none;padding:0 18px;cursor:pointer;
  -webkit-appearance:none;-moz-appearance:none;appearance:none;
  /* Down-chevron rendered as inline SVG so it tints with the tile */
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='%23ffffff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' opacity='0.75'/></svg>");
  background-repeat:no-repeat;background-position:right 6px center;
}
.read-tile select option{color:#1E2A4A;background:#fff;font-size:18px}
.read-tile:focus-within{box-shadow:var(--shadow), 0 0 0 3px rgba(246,196,69,.55)}
.read-colon{font-family:'DM Mono';font-weight:500;font-size:48px;align-self:center;color:var(--ink);opacity:.35}

/* AM/PM context pill shown above the clock in 24-hour Read mode.
   Pairs with the analog hands to disambiguate e.g. 2:30 vs 14:30. */
.day-half{display:flex;align-items:center;justify-content:center;gap:6px;
  margin:0 auto 4px;padding:8px 16px;
  background:var(--cream);border:1px dashed #d9c98c;border-radius:999px;
  font-family:'Baloo 2',system-ui,sans-serif;font-weight:700;font-size:15px;
  color:var(--ink);width:fit-content}
.day-half span{font-family:initial}

/* Owl */
.owl-bubble{position:relative;background:#fff;border:1px solid #eadfb8;border-radius:18px;padding:12px 14px;box-shadow:var(--shadow);font-size:14px;color:#3a4466;line-height:1.45}
.owl-bubble:after{content:"";position:absolute;left:24px;bottom:-10px;width:18px;height:18px;background:#fff;border-right:1px solid #eadfb8;border-bottom:1px solid #eadfb8;transform:rotate(45deg)}
.owl-row{display:flex;align-items:flex-end;gap:12px;margin-top:14px}
.owl-row .owl{width:78px;height:78px;flex-shrink:0}

/* Keyboard hint */
.hint{font-size:12px;color:#7b86a6;margin-top:8px;letter-spacing:.02em}
kbd{font-family:'DM Mono';background:#fff;border:1px solid #eadfb8;border-bottom-width:2px;border-radius:6px;padding:1px 6px;font-size:11px;color:var(--ink)}

/* ---------- Below-fold SEO content ---------- */
.seo-below{max-width:900px;margin:40px auto 60px;padding:0 28px;color:#2B4C7E}
.seo-below h2{font-family:'Baloo 2';font-weight:700;font-size:24px;margin:28px 0 10px;color:var(--ink)}
.seo-below h3{font-family:'Baloo 2';font-weight:700;font-size:18px;margin:20px 0 8px;color:var(--ink)}
.seo-below p{font-size:15.5px;line-height:1.6;margin:0 0 12px;color:#3a4466}
.seo-below ul{padding-left:20px;margin:0 0 14px;color:#3a4466}
.seo-below ul li{margin-bottom:6px;line-height:1.5}
.seo-below .related{background:#fff;border:1px solid #eadfb8;border-radius:16px;padding:18px 22px;margin-top:24px}
.seo-below .related a{color:#2B4C7E;font-weight:600;text-decoration:none}
.seo-below .related a:hover{text-decoration:underline}
.site-footer{max-width:1180px;margin:0 auto;padding:20px 28px 40px;border-top:1px solid #eadfb8;font-size:13px;color:#6b7794;text-align:center}
.site-footer a{color:#2B4C7E;text-decoration:none;margin:0 8px}

/* ---------- Print ---------- */
.print-only{display:none}
@media print{
  /* A4 with 10mm margins → 190×277mm printable area.
     Clock is 1:1 aspect, so it's limited by width (190mm). Header (~14mm) +
     footer (~10mm) + breathing room (~8mm) = 32mm reserved → 245mm cap on
     clock height keeps the whole sheet on one page no matter the browser. */
  @page{size:A4;margin:10mm}
  html,body{margin:0;padding:0;background:#fff}
  /* Hide everything except the .print-only reference card.
     The .print-only div lives INSIDE .app (it's part of the React tree), so
     we cannot display:none .app — that would hide the print content too.
     Instead, hide every direct child of .app except the .print-only block. */
  .seo-intro,.seo-below,.site-header,.site-footer,.no-print{display:none !important}
  .app{padding:0 !important;max-width:none !important}
  .app > *:not(.print-only){display:none !important}
  .print-only{display:block !important}

  .print-sheet{
    display:flex;
    flex-direction:column;
    page-break-after:avoid;
    page-break-inside:avoid;
  }

  .print-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    padding-bottom:8px;
    margin-bottom:6mm;
    border-bottom:1px solid #1E2A4A;
    font-family:'Fredoka',system-ui,sans-serif;
    font-size:13px;
    color:#1E2A4A;
  }
  .ph-title{font-family:'Baloo 2';font-weight:800;font-size:20px;letter-spacing:-.3px}
  .ph-legend{font-size:13px}
  .ph-short{color:#E63946;font-weight:700}
  .ph-long{color:#2E6FD6;font-weight:700}
  .ph-meta{font-family:'DM Mono',monospace;font-weight:500;font-size:11px;letter-spacing:.06em;color:#5b6685}

  .print-clock{
    display:flex;
    align-items:center;
    justify-content:center;
  }
  .print-clock svg{
    width:auto;
    height:auto;
    max-width:190mm;
    max-height:245mm;
    cursor:default !important;
  }

  .print-footer{
    text-align:center;
    font-family:'DM Mono',monospace;
    font-weight:500;
    font-size:11px;
    letter-spacing:.08em;
    color:#5b6685;
    padding-top:8px;
    margin-top:6mm;
    border-top:1px solid #d9c98c;
  }

  /* Force-hide anything that might leak through (touchaction overlays, etc.) */
  .clockwrap{touch-action:auto !important;user-select:auto !important}
}
