/* eric-yen.com: components every product page shares (loaded after site.css). */
.hero h1.product { font-size: 72px; margin: 0 0 18px; }
.hero .tagline.product { font-size: 24px; }

/* Gallery: real captures of the tool, one at a time, tabs below */
.gallery { margin: 0 0 96px; }
.shot { background: #141318; border: 1px solid var(--border); border-radius: 8px; padding: 14px; overflow: hidden; }
.shot img { display: block; width: 100%; height: auto; border-radius: 4px; }
.shot img[hidden] { display: none; }
.shot .only-dark { display: none; }
:root[data-theme="dark"] .shot .only-light { display: none; }
:root[data-theme="dark"] .shot .only-dark:not([hidden]) { display: block; }
.gallery-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; margin-top: 14px; }
.gallery-bar .line { font-style: italic; color: var(--olive); font-size: 14px; margin: 0; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tabs button { font-family: var(--latin-ui); font-size: 12px; font-weight: 500; color: var(--stone); background: none; border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.tabs button[aria-selected="true"] { color: var(--brand); background: var(--brand-tint); border-color: transparent; }
@media (hover: hover) { .tabs button:hover { color: var(--brand); } }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; counter-reset: st; }
.steps li { counter-increment: st; background: var(--ivory); border: 1px solid var(--border); border-radius: 8px; padding: 22px; }
.steps li::before { content: counter(st); display: block; font-family: var(--latin-ui); font-size: 12px; font-weight: 600; color: var(--brand); margin-bottom: 8px; }
.steps h3 { font-weight: 500; font-size: 19px; margin: 0 0 6px; }
.steps p { margin: 0; color: var(--dark-warm); font-size: 14.5px; line-height: 1.65; }

/* Editorial table */
.table { width: 100%; border-collapse: collapse; margin-top: 28px; font-size: 14.5px; }
.table th { font-family: var(--latin-ui); font-size: 12px; font-weight: 500; letter-spacing: .4px; color: var(--stone); text-align: left; padding: 0 16px 10px 0; border-bottom: 1px solid var(--border); }
.table td { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--border-soft); color: var(--dark-warm); vertical-align: top; }
.table td:first-child { color: var(--near-black); font-weight: 500; white-space: nowrap; }

/* Evidence grades */
.grades { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 8px 0 0; }
.grade { background: var(--ivory); border: 1px solid var(--border); border-radius: 8px; padding: 18px; }
.grade b { display: block; font-size: 30px; font-weight: 500; line-height: 1; color: var(--brand); margin-bottom: 10px; }
.grade h4 { margin: 0 0 4px; font-size: 16px; font-weight: 500; }
.grade p { margin: 0; color: var(--olive); font-size: 13.5px; line-height: 1.6; }
.grade.warn b, .grade.warn p { color: #b4452c; }
:root[data-theme="dark"] .grade.warn b, :root[data-theme="dark"] .grade.warn p { color: #e08a72; }

/* Red flags */
.flags { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; }
.flags li { padding: 12px 0 12px 14px; border-bottom: 1px solid var(--border-soft); border-left: 2px solid #c8664d; margin-bottom: 10px; font-size: 15px; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--border-soft); padding: 16px 0; }
.faq details:first-child { border-top: 1px solid var(--border-soft); }
.faq summary { cursor: pointer; font-size: 17px; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--latin-ui); color: var(--stone); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 10px 0 0; color: var(--olive); font-size: 15px; }

/* Maker */
.maker { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 28px; align-items: start; }
.maker img { width: 96px; height: 96px; mix-blend-mode: multiply; }
:root[data-theme="dark"] .maker img { mix-blend-mode: normal; border-radius: 50%; }
.maker h2 { font-weight: 500; font-size: 26px; margin: 0 0 8px; }
.maker p { margin: 0 0 14px; color: var(--olive); }

@media (max-width: 880px) {
  .steps, .grades { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flags { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero h1.product { font-size: 56px; }
}
@media (max-width: 480px) {
  .steps, .grades, .flags { grid-template-columns: minmax(0, 1fr); }
  .hero h1.product { font-size: 42px; }
  .hero .tagline.product { font-size: 19px; }
  .gallery-bar { grid-template-columns: minmax(0, 1fr); }
  .shot { padding: 8px; }
  .table, .table tbody, .table tr, .table td { display: block; }
  .table thead { display: none; }
  .table td { border: 0; padding: 2px 0; }
  .table tr { padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
  .table td:first-child { white-space: normal; }
  .maker { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .maker img { width: 72px; height: 72px; }
}

/* ========== The tool itself (course-check), restyled in the site's tokens ========== */
.tool { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin: 0 0 96px; scroll-margin-top: 24px; }
.panel { background: var(--ivory); border: 1px solid var(--border); border-radius: 8px; min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border-soft); }
.panel-title { font-size: 17px; font-weight: 500; margin: 0; }
.panel-note { font-family: var(--latin-ui); font-size: 12px; color: var(--stone); margin: 0; }
.panel-body { padding: 20px; }
.field { margin: 0 0 18px; }
.field:last-child { margin-bottom: 0; }
.tool label, .tool .group-label { display: block; font-family: var(--latin-ui); font-size: 13px; font-weight: 500; color: var(--dark-warm); margin: 0 0 6px; }
.tool .hint { font-weight: 400; font-size: 12px; color: var(--stone); margin-left: 6px; }
.example-flag { font-size: 11px; font-weight: 500; color: #9a6a1f; border: 1px dashed currentColor; border-radius: 4px; padding: 0 5px; margin-left: 4px; }
:root[data-theme="dark"] .example-flag { color: #d8b06a; }
.tool input, .tool textarea {
  width: 100%; font-family: var(--latin-ui); font-size: 15px; line-height: 1.5; color: var(--near-black);
  background: var(--parchment); border: 1.5px solid var(--border); border-radius: 8px; padding: 10px 12px; outline: none;
  transition: border-color .15s;
}
.tool textarea { resize: vertical; min-height: 64px; }
.tool input:focus, .tool textarea:focus { border-color: var(--brand); }
.modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; padding: 3px; border: 1.5px solid var(--border); border-radius: 999px; }
.modes button { font-family: var(--latin-ui); font-size: 13px; font-weight: 500; color: var(--stone); background: none; border: 0; border-radius: 999px; padding: 8px 4px; cursor: pointer; transition: background .15s, color .15s; }
.modes button[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); }
@media (hover: hover) { .modes button[aria-pressed="false"]:hover { color: var(--brand); } }
.mode-note { font-family: var(--latin-ui); font-size: 12.5px; line-height: 1.65; color: var(--olive); margin: 10px 0 0; }
.launch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.go { text-align: left; background: var(--parchment); border: 1.5px solid var(--border); border-radius: 8px; padding: 12px 14px; cursor: pointer; font-family: var(--latin-ui); transition: border-color .15s, transform .15s; }
@media (hover: hover) { .go:hover { border-color: var(--brand); transform: translateY(-1px); } }
.go:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.go .n { display: block; font-size: 15px; font-weight: 500; color: var(--near-black); }
.go .s { display: block; font-size: 12px; color: var(--stone); margin-top: 2px; }
.go .s.auto { color: var(--brand); }
.go.wide { grid-column: 1 / -1; }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 18px; }
.row-actions .btn-ghost { min-width: 0; padding: 9px 18px; font-size: 14px; }
.count { display: flex; justify-content: space-between; font-family: var(--latin-ui); font-size: 12px; color: var(--stone); margin: 0 0 6px; }
.count b { font-weight: 500; color: var(--dark-warm); font-variant-numeric: tabular-nums; }
.preview { margin: 0; background: var(--inline-code-bg); border-radius: 8px; padding: 14px; font: 12.5px/1.65 "JetBrains Mono", "SF Mono", ui-monospace, "PingFang TC", monospace; color: var(--dark-warm); white-space: pre-wrap; word-break: break-word; max-height: 340px; overflow: auto; }
#toast { position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  max-width: calc(100% - 32px); background: var(--near-black); color: var(--parchment); font-family: var(--latin-ui); font-size: 14px; line-height: 1.5; padding: 12px 18px; border-radius: 12px; transition: opacity .25s, transform .25s; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 880px) { .tool { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) { .panel-body { padding: 16px; } .tool { margin-bottom: 64px; } }
.product-foot { padding-top: 32px; border-top: 1px solid var(--border-soft); }

/* Product pages: personal links live in the maker card, not the top bar */
.maker-links { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin: 16px 0 0; }
.maker-links a { color: var(--stone); display: inline-flex; padding: 4px; margin: -4px; }
@media (hover: hover) { .maker-links a:hover { color: var(--brand); } }

/* Product icon beside the title */
.product-title { display: flex; align-items: center; gap: 22px; margin: 0 0 18px; }
.product-title img { width: 76px; height: 76px; border-radius: 17px; flex: none; }
.product-title h1.product { margin: 0; }
@media (max-width: 880px) { .product-title img { width: 64px; height: 64px; border-radius: 14px; } }
@media (max-width: 480px) { .product-title { gap: 14px; } .product-title img { width: 52px; height: 52px; border-radius: 12px; } }
