/* Toolowner site · plain rhythm layer (index, features, security).
   Warm paper (#FAF9F6) and deep ink (#1B1E1C); an English uppercase eyebrow over a calm two-line heading and one short line; numbered
   stories (01–04); generous whitespace and layered magazine cards. Loaded after site.css: only adds and tunes, never removes a behaviour. */

/* Deep ink on warm paper (light only: the dark tokens in site.css are more specific and stay as they are). */
:root { --ink: #1B1E1C; --sec: clamp(104px, 12vw, 176px); --pw-rule: color-mix(in srgb, var(--ink) 14%, transparent); }

/* ---------- the eyebrow: a short English line, uppercase, widely tracked ---------- */
.kicker {
  font: 600 12px/1.3 var(--f-body); letter-spacing: .18em; text-transform: uppercase; color: var(--muted);
  margin: 0 0 20px; gap: 12px;
}
.kicker::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: .55; flex: none; }
.kicker .num { font-family: var(--f-mono); letter-spacing: .06em; }
.kicker .status { letter-spacing: .08em; }
.vision .kicker { color: var(--band-muted); }
/* "TRY IT — 先在這裡試試看": the Chinese half keeps its own spacing. */
.kicker [data-l="zh"] { letter-spacing: .06em; }

/* Headings breathe a little more; the line under them stays short. */
.head { margin-bottom: clamp(36px, 5vw, 56px); }
.head > p { font-size: 17px; line-height: 1.65; max-width: 30em; }

/* ---------- 01–04: numbered stories ---------- */
.pw-num { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); counter-reset: none; }
.pw-num > li {
  min-width: 0; position: relative; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 14px;
  padding: clamp(24px, 3.4vw, 40px); border-radius: var(--r-4); background: var(--card); border: 1px solid var(--edge);
  box-shadow: var(--elev-1), inset 0 1px 0 var(--hl);
}
.pw-num > li:nth-child(2), .pw-num > li:nth-child(3) { background: var(--panel2); }
.pw-n {
  font: 400 clamp(56px, 7vw, 88px)/.9 var(--f-serif); letter-spacing: -.04em; color: var(--green-deep);
  font-variant-numeric: lining-nums tabular-nums;
}
.pw-num h3 { margin: 0; font: 500 clamp(22px, 2.4vw, 28px)/1.25 var(--f-serif); letter-spacing: -.01em; }
.pw-num p { margin: 0; color: var(--muted); line-height: 1.7; max-width: 34em; }
.pw-more { justify-self: start; display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--pw-rule); text-underline-offset: 5px; }
.pw-more:hover { text-decoration-color: currentColor; }

/* ---------- TRY IT: three tabs over the same try area ---------- */
.pw-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
:root:not(.js) .pw-tabs { display: none; }
.pw-tabs [role="tab"] {
  min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink);
  font: 600 15px/1 var(--f-body); cursor: pointer; transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.pw-tabs [role="tab"]:hover { background: var(--chip); }
.pw-tabs [role="tab"][aria-selected="true"] { background: var(--ink); color: var(--card); border-color: var(--ink); }
.pw-tabs [role="tab"]:focus-visible, .pw-tone button:focus-visible, .pw-secret:focus-visible, .pw-result:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.pw-panel[hidden] { display: none; }
.pw-panel + .pw-panel { margin-top: 28px; }
.js .pw-panel + .pw-panel { margin-top: 0; }

.pw-note-out { min-height: 196px; display: grid; align-content: start; gap: 6px; padding: 14px 16px; border-radius: var(--r-2); background: var(--card); border: 1px solid var(--edge); font-size: 15px; line-height: 1.6; }
.pw-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
.pw-text { min-width: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.pw-result, .pw-secret {
  min-height: 36px; padding: 4px 12px; border-radius: 999px; font: 600 14px/1.3 var(--f-body); cursor: pointer; text-align: left;
  max-width: 100%; overflow-wrap: anywhere;
}
.pw-result { border: 1px solid color-mix(in srgb, var(--green-deep) 45%, transparent); background: var(--t-ok-bg); color: var(--t-ok); }
.pw-secret { border: 1px dashed var(--muted); background: var(--chip); color: var(--ink); }
.pw-secret.open { border-style: solid; font-family: var(--f-mono); font-weight: 500; }

/* Paper / ink: the link card's two themes, side by side with its switch. */
.pw-tone-copy { margin: 0; color: var(--muted); line-height: 1.7; }
.pw-tone { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: var(--gap); align-items: stretch; }
.pw-tone-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.pw-tone-pick button { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink); font: 600 15px/1 var(--f-body); cursor: pointer; }
.pw-tone-pick button[aria-pressed="true"] { background: var(--ink); color: var(--card); border-color: var(--ink); }
.pw-tone-card {
  --t-bg: #FAF9F6; --t-card: #FFFFFF; --t-ink: #1B1E1C; --t-muted: #5E625F; --t-line: #E4E2DC; --t-btn: #1B1E1C; --t-btn-ink: #FFFFFF;
  display: grid; justify-items: center; align-content: start; gap: 10px; padding: clamp(28px, 4vw, 44px) 20px; border-radius: var(--r-3);
  background: var(--t-bg); color: var(--t-ink); border: 1px solid var(--t-line); transition: background-color .3s var(--ease), color .3s var(--ease);
}
.pw-tone-card[data-tone="ink"] { --t-bg: #141412; --t-card: #1E1F1C; --t-ink: #F3F4F0; --t-muted: #A9ADA7; --t-line: #33352F; --t-btn: #F3F4F0; --t-btn-ink: #141412; }
.pw-tone-card b { font: 600 22px/1.2 var(--f-body); }
.pw-tone-card small { color: var(--t-muted); font-size: 14px; }
.pw-tone-card span.l { width: min(100%, 300px); text-align: center; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--t-line); background: var(--t-card); font-weight: 600; font-size: 15px; }
.pw-tone-card span.i { width: min(100%, 300px); text-align: center; padding: 12px 14px; border-radius: 999px; background: var(--t-btn); color: var(--t-btn-ink); font-weight: 700; font-size: 15px; }

/* ---------- YOUR DATA. YOUR PRIVACY.: three promises ---------- */
.pw-promise { list-style: none; margin: 0 0 clamp(40px, 6vw, 64px); padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.pw-promise > li { min-width: 0; display: grid; align-content: start; gap: 12px; padding: clamp(22px, 3vw, 32px); border-radius: var(--r-3); background: var(--card); border: 1px solid var(--edge); box-shadow: var(--elev-1), inset 0 1px 0 var(--hl); }
.pw-promise .pw-k { font: 600 12px/1.3 var(--f-body); letter-spacing: .18em; text-transform: uppercase; color: var(--green-deep); }
.pw-promise h3 { margin: 0; font: 500 22px/1.3 var(--f-serif); }
.pw-promise p { margin: 0; color: var(--muted); line-height: 1.7; }
.pw-fine { margin: 0 0 clamp(36px, 5vw, 56px); color: var(--muted); font-size: 14px; line-height: 1.7; max-width: 46em; }

/* ---------- WHAT'S NEW ---------- */
.pw-news { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--pw-rule); }
.pw-news > li { display: grid; grid-template-columns: minmax(0, 180px) minmax(0, 1fr); gap: 10px clamp(20px, 4vw, 56px); padding: clamp(22px, 3vw, 32px) 0; border-bottom: 1px solid var(--pw-rule); }
.pw-news time { font: 600 13px/1.5 var(--f-mono); letter-spacing: .06em; color: var(--green-deep); }
.pw-news h3 { margin: 0 0 8px; font: 500 clamp(20px, 2.2vw, 26px)/1.3 var(--f-serif); }
.pw-news p { margin: 0; color: var(--muted); line-height: 1.7; max-width: 40em; }
.pw-news .tagb { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); font: 600 11px/1.4 var(--f-mono); letter-spacing: .06em; color: var(--muted); vertical-align: middle; }

/* ---------- phones ---------- */
@media (max-width: 760px) {
  .pw-num, .pw-promise { grid-template-columns: minmax(0, 1fr); }
  .pw-tone { grid-template-columns: minmax(0, 1fr); }
  .pw-news > li { grid-template-columns: minmax(0, 1fr); }
  .head > p { font-size: 16px; }
  .pw-tabs [role="tab"] { padding: 0 14px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { .pw-tone-card, .pw-tabs [role="tab"] { transition: none; } }
:root[data-motion="off"] .pw-tone-card, :root[data-motion="off"] .pw-tabs [role="tab"] { transition: none; }

/* ---------- With your AI tools: names, three columns, one line on models (index, features) ----------
   Plain rows and rules; no eyebrow, no badges, no numbering, no nested cards. Body text uses 17 / 15 / 14 px only. */
.ai-names { list-style: none; margin: 0 0 clamp(32px, 4.5vw, 48px); padding: 0; display: flex; flex-wrap: wrap; border-top: 1px solid var(--pw-rule); border-bottom: 1px solid var(--pw-rule); }
.ai-names li { flex: 1 1 auto; padding: 18px clamp(14px, 2vw, 24px); font: 600 17px/1.3 var(--f-body); color: var(--ink); text-align: center; white-space: nowrap; }
.ai-names li + li { border-left: 1px solid var(--pw-rule); }
.ai-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3.4vw, 48px); }
.ai-cols > div { min-width: 0; display: grid; align-content: start; gap: 10px; }
.ai-cols h3 { margin: 0; font: 500 22px/1.3 var(--f-serif); }
.ai-cols p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.7; }
.ai-sec code, .ba-meta code { font: 500 .92em/1.3 var(--f-mono); color: var(--ink); }
.ai-link { justify-self: start; display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-size: 15px; font-weight: 600; text-decoration: underline; text-decoration-color: var(--pw-rule); text-underline-offset: 5px; transition: text-decoration-color .2s var(--ease); }
.ai-link:hover { text-decoration-color: currentColor; }
.ai-byo { margin: clamp(36px, 5vw, 56px) 0 0; padding-top: clamp(24px, 3vw, 32px); border-top: 1px solid var(--pw-rule); font-size: 17px; line-height: 1.7; color: var(--muted); max-width: 44em; }
.ai-byo b { color: var(--ink); font-weight: 600; }

/* ---------- Before → after: a connected segmented switch over one card (pure CSS radios, no script) ---------- */
.ba { position: relative; }
.ba-r { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.ba-seg {
  display: inline-grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); max-width: 100%; margin: 0 0 18px; padding: 4px;
  border-radius: 999px; background: var(--chip); border: 1px solid var(--edge);
}
.ba-seg label {
  min-width: 0; min-height: 44px; display: flex; align-items: center; justify-content: center; padding: 0 18px; border-radius: 999px;
  font: 600 15px/1.25 var(--f-body); color: var(--muted); text-align: center; word-break: keep-all; overflow-wrap: anywhere; cursor: pointer; user-select: none;
  transition: background-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}
.ba-seg label:hover { color: var(--ink); }
#ba-r1:checked ~ .ba-seg label[for="ba-r1"], #ba-r2:checked ~ .ba-seg label[for="ba-r2"], #ba-r3:checked ~ .ba-seg label[for="ba-r3"] { background: var(--card); color: var(--ink); box-shadow: var(--elev-1); }
#ba-r1:focus-visible ~ .ba-seg label[for="ba-r1"], #ba-r2:focus-visible ~ .ba-seg label[for="ba-r2"], #ba-r3:focus-visible ~ .ba-seg label[for="ba-r3"] { outline: 2px solid var(--focus); outline-offset: 2px; }
.ba-card { border-radius: var(--r-4); background: var(--card); border: 1px solid var(--edge); box-shadow: var(--elev-1), inset 0 1px 0 var(--hl); overflow: hidden; }
.ba-p { display: none; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
#ba-r1:checked ~ .ba-card .ba-p1, #ba-r2:checked ~ .ba-card .ba-p2, #ba-r3:checked ~ .ba-card .ba-p3 { display: grid; }
.ba-side { min-width: 0; display: grid; align-content: start; gap: 12px; padding: clamp(20px, 3vw, 32px); }
.ba-after { background: var(--panel2); }
.ba-arrow { align-self: center; padding: 0 4px; font: 400 22px/1 var(--f-body); color: var(--green-deep); }
.ba-k { margin: 0; font: 600 14px/1.3 var(--f-body); color: var(--muted); }
.ba-text, .ba-code { margin: 0; min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); }
.ba-text { font: 400 15px/1.7 var(--f-body); }
.ba-code { font: 500 14px/1.6 var(--f-mono); }
.ba-text mark { background: var(--t-ok-bg); color: var(--t-ok); border-radius: 6px; padding: 0 5px; font-weight: 600; }
.ba-meta { margin: 4px 0 0; padding-top: 12px; border-top: 1px solid var(--pw-rule); font: 600 14px/1.5 var(--f-body); color: var(--green-deep); }

@media (max-width: 760px) {
  .ai-cols { grid-template-columns: minmax(0, 1fr); }
  .ai-names li { padding: 14px 10px; font-size: 15px; }
  .ai-names li + li { border-left: 0; }
  .ai-names { gap: 0; }
  .ba-seg { display: grid; width: 100%; }
  .ba-seg label { padding: 6px 8px; font-size: 14px; }
  .ba-p { grid-template-columns: minmax(0, 1fr); }
  .ba-arrow { justify-self: center; transform: rotate(90deg); padding: 6px 0; }
}
@media (prefers-reduced-motion: reduce) { .ba-seg label, .ai-link { transition: none; } }
:root[data-motion="off"] .ba-seg label, :root[data-motion="off"] .ai-link { transition: none; }
