/* Dolphin LLM public pages. Tokens live in inc/layout_style.css.php (shared with the cabinet and admin). */

/* ---------- buttons of the public pages ---------- */
.btn-buoy, .btn-line { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 12px;
  font-weight: 600; font-size: 1rem; letter-spacing: -0.005em; white-space: nowrap; }
.btn-buoy { background: var(--buoy); color: var(--ink); box-shadow: inset 0 -2px 0 rgba(15,43,58,.18); }
.btn-buoy:hover { background: var(--buoy-ink); }
.btn-line { border: 1.5px solid var(--ink); color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }

/* ---------- hero: copy on the left, the client switch on the right ---------- */
body.home > .wrap { --wrap: 1180px; padding-top: 0; }
.hx { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 56px; align-items: center; padding: 56px 52px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; }
.hx h1 { font-family: var(--f-display); font-weight: 750; font-size: clamp(2.1rem, 3.7vw, 3.1rem); line-height: 1.05; letter-spacing: -0.035em; margin: 0 0 22px; text-wrap: balance; }
.hx h1 span { display: block; }
.hx .lede { font-size: 1.14rem; line-height: 1.6; color: var(--ink-2); margin: 0 0 30px; max-width: 34em; }
.hx-cta { display: flex; gap: 12px; flex-wrap: nowrap; }   /* the two hero buttons always share one row */
.hx-cta a { flex: 0 1 auto; min-width: 0; white-space: normal; text-align: center; line-height: 1.25; }
.hx-note { margin: 18px 0 0; font-size: 0.93rem; color: var(--ink-3); }

.hx-demo { position: relative; }
.sonar { position: absolute; left: -150px; top: -120px; width: 520px; height: 520px; pointer-events: none; z-index: 0; }
.sonar circle { fill: none; stroke: var(--teal); stroke-width: 1.2; transform-origin: 260px 260px; }
.sonar circle:nth-child(1) { opacity: .34; } .sonar circle:nth-child(2) { opacity: .24; } .sonar circle:nth-child(3) { opacity: .16; }
.sonar circle:nth-child(4) { opacity: .10; } .sonar circle:nth-child(5) { opacity: .06; }
.sonar .pulse { stroke: var(--buoy); stroke-width: 2.5; opacity: 0; }
.ping .sonar .pulse { animation: ping 1.6s cubic-bezier(.2,.7,.3,1) .35s 1 both; }
@keyframes ping { 0% { transform: scale(.12); opacity: .95; } 100% { transform: scale(1); opacity: 0; } }

.term { position: relative; z-index: 1; background: var(--deep); color: var(--deep-ink); border-radius: 18px; overflow: hidden;
  box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 30px 60px -28px rgba(15,43,58,.55); }
.term-bar { display: flex; align-items: center; gap: 4px; padding: 10px 12px 0; border-bottom: 1px solid var(--deep-line); }
.term-bar button { font: inherit; font-size: 0.86rem; color: var(--deep-dim); background: none; border: 0; padding: 8px 12px 10px; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px; }
.term-bar button[aria-selected="true"] { color: var(--deep-ink); border-bottom-color: var(--buoy); }
.term-bar button:focus-visible { outline: 2px solid var(--buoy); outline-offset: -4px; border-radius: 6px; }
.term-bar .file { margin-left: auto; color: var(--deep-dim); font-family: var(--f-mono); font-size: 0.78rem; padding-right: 6px; }
.term pre { margin: 0; background: none; border: 0; border-radius: 0; padding: 18px 0 16px; font-family: var(--f-mono); font-size: 0.8rem; line-height: 1.75; color: var(--deep-ink);
  overflow-x: auto; scrollbar-color: var(--deep-dim) transparent; scrollbar-width: thin; }
.term pre code { display: block; min-width: max-content; font-size: inherit; }
.term .ln { display: block; padding: 0 22px 0 18px; border-left: 3px solid transparent; }
.term .ln.chg { background: rgba(244,196,48,.10); border-left-color: var(--buoy); }
.term-legend { display: flex; align-items: center; gap: 8px; padding: 0 22px 14px; font-size: 0.8rem; color: var(--deep-dim); }
.term-legend i { width: 12px; height: 12px; border-radius: 3px; background: rgba(244,196,48,.25); box-shadow: inset 3px 0 0 var(--buoy); }
.term .k { color: #8FD3DE; } .term .s { color: #F2D57E; } .term .c { color: var(--deep-dim); }
.term-out { border-top: 1px solid var(--deep-line); padding: 14px 22px 20px; min-height: 128px; }
.term-out .who { font-size: 0.78rem; color: var(--deep-dim); margin-bottom: 6px; display: flex; justify-content: space-between; gap: 12px; }
.term-out p { margin: 0; font-size: 0.95rem; line-height: 1.6; color: #EAF3F5; }
.term-out .caret { display: inline-block; width: 8px; height: 1.05em; vertical-align: -0.16em; background: var(--buoy); margin-left: 2px; }
.term-out.done .caret { display: none; }

/* ---------- sections ---------- */
.sec { margin-top: 20px; padding: 56px 52px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; }
.sec > h2, .sec-head h2 { font-family: var(--f-display); font-weight: 720; font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.1; letter-spacing: -0.03em; margin: 0 0 12px; max-width: 22em; }
.sec-lede { color: var(--ink-2); font-size: 1.05rem; margin: 0 0 36px; max-width: 40em; }

/* the numbers: a spec plate, label on the left, value on the right */
.plate { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; margin: 0; }
.plate div { display: grid; grid-template-columns: 11em minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line-2); align-items: baseline; }
.plate dt { color: var(--ink-3); font-size: 0.95rem; }
.plate dd { margin: 0; font-size: 1.05rem; }
.plate dd b { font-family: var(--f-display); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.plate dd small { display: block; color: var(--ink-3); font-size: 0.88rem; margin-top: 2px; }
.plate-foot { margin: 22px 0 0; color: var(--ink-2); }
.plate-foot a, .sec a.tx { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }

/* in the API / not offered */
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; }
.two h3 { font-size: 1.12rem; margin: 0 0 14px; letter-spacing: -0.01em; }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { padding: 11px 0 11px 32px; border-bottom: 1px solid var(--line); position: relative; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 19px; width: 12px; height: 7px; border: solid var(--teal); border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.ticks.no li { color: var(--ink-2); }
.ticks.no li::before { width: 13px; height: 0; border-width: 0 0 2px 0; border-color: var(--ink-3); transform: none; top: 22px; }
.ticks li span { display: block; color: var(--ink-3); font-size: 0.9rem; }

/* how to start: a real sequence */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; counter-reset: st; }
.steps li { counter-increment: st; padding: 0 28px 0 0; }
.steps li + li { padding-left: 28px; border-left: 1px solid var(--line-2); }
.steps li::before { content: counter(st); display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--paper);
  font-weight: 700; margin-bottom: 16px; }
.steps h3 { font-size: 1.12rem; margin: 0 0 6px; }
.steps p { margin: 0; color: var(--ink-2); }

/* uses */
.uses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 56px; }
.uses h3 { font-size: 1.12rem; margin: 0 0 6px; }
.uses p { margin: 0; color: var(--ink-2); }

/* content rule */
.rule { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.rule-box { background: var(--wash); border-radius: 16px; padding: 26px 28px; }
.rule-box p { margin: 0 0 12px; } .rule-box p:last-child { margin: 0; }
.rule-box code { white-space: nowrap; }

/* FAQ */
.faq { max-width: 52em; }
.faq details { border-bottom: 1px solid var(--line-2); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 44px 20px 0; font-size: 1.08rem; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 27px; width: 10px; height: 10px; border: solid var(--ink); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .18s ease; }
.faq details[open] summary::after { transform: rotate(-135deg); top: 31px; }
.faq details p { margin: 0 0 20px; color: var(--ink-2); max-width: 46em; }

/* last call */
.last { margin: 20px 0 0; background: var(--deep); color: var(--deep-ink); border-radius: 22px; padding: 48px 48px; display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.last h2 { font-family: var(--f-display); font-size: clamp(1.5rem, 2.8vw, 2.1rem); line-height: 1.12; letter-spacing: -0.03em; margin: 0 0 8px; color: #fff; }
.last p { margin: 0; color: var(--deep-dim); }
.last .btn-line { border-color: var(--deep-ink); color: var(--deep-ink); }
.last .btn-line:hover { background: var(--deep-ink); color: var(--deep); }

@media (max-width: 960px) {
  .hx { grid-template-columns: minmax(0, 1fr); gap: 40px; padding: 36px 28px; }
  .sec { padding: 44px 28px; }
  .sonar { left: auto; right: -160px; top: -150px; }
  .plate, .two, .uses, .rule { grid-template-columns: minmax(0, 1fr); gap: 0 0; }
  .two, .uses, .rule { gap: 36px; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .steps li, .steps li + li { padding: 0; border: 0; }
}
@media (max-width: 560px) {
  .plate div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .hx { padding: 28px 18px; border-radius: 18px; }
  .sec { padding: 36px 18px; border-radius: 18px; margin-top: 14px; }
  .last { padding: 32px 22px; border-radius: 18px; margin-top: 14px; }
  .hx-cta a { flex: 1 1 0; padding-left: 14px; padding-right: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .ping .sonar .pulse { animation: none; }
  .faq summary::after { transition: none; }
}

/* ---------- inner pages: pricing, docs ---------- */
.pg-h1 { font-family: var(--f-display); font-weight: 750; font-size: clamp(1.9rem, 3.4vw, 2.6rem); line-height: 1.08; letter-spacing: -0.035em; margin: 0 0 12px; }
.packs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.pack { border: 1px solid var(--line-2); border-radius: 16px; padding: 20px 18px; }
.pack-pay { font-family: var(--f-display); font-weight: 750; font-size: 1.7rem; letter-spacing: -0.03em; }
.pack-get { color: var(--ink-2); font-size: 0.92rem; margin-top: 4px; }
.pack-bonus { margin-top: 10px; font-size: 0.85rem; font-weight: 600; color: var(--teal); }
.calc { display: grid; grid-template-columns: 1fr 1fr auto; gap: 16px 24px; align-items: end; }
.calc label { display: grid; gap: 6px; font-size: 0.92rem; color: var(--ink-2); }
.calc input { font: inherit; font-size: 1.05rem; color: var(--ink); border: 1px solid var(--line-2); border-radius: 12px; padding: 11px 14px; width: 100%; font-variant-numeric: tabular-nums; }
.calc input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.calc-out { background: var(--wash); border-radius: 12px; padding: 10px 18px; min-width: 180px; }
.calc-out span { display: block; font-size: 0.85rem; color: var(--ink-3); }
.calc-out b { font-family: var(--f-display); font-size: 1.6rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.sec pre { margin: 14px 0; background: var(--deep); color: var(--deep-ink); border: 0; border-radius: 14px; padding: 18px 20px; font-size: 0.84rem; line-height: 1.7; }
.sec p a:not(.btn-buoy):not(.btn-line) { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }
.docs { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; align-items: start; }
.docs-toc { position: sticky; top: 20px; display: grid; gap: 2px; padding: 8px 0; }
.docs-toc a { color: var(--ink-2); font-size: 0.92rem; padding: 6px 10px; border-radius: 8px; }
.docs-toc a:hover { background: var(--surface); color: var(--ink); }
@media (max-width: 960px) {
  .packs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calc { grid-template-columns: minmax(0, 1fr); }
  .docs { grid-template-columns: minmax(0, 1fr); }
  .docs-toc { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
}

/* ---------- carried-over content: chips, prose, crumbs, guides, comparisons ---------- */
.hx-chips { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hx-chips li { font-size: 0.88rem; color: var(--ink-2); background: var(--wash); border-radius: 999px; padding: 6px 13px; }
.uses-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.prose { max-width: none; }
.prose h2 { margin: 34px 0 10px; } .prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--ink-2); line-height: 1.7; max-width: 46em; }
.prose ul { padding-left: 20px; }
.prose p code, .prose li code { font-size: 0.86em; }
.crumbs { font-size: 0.88rem; color: var(--ink-3); margin-bottom: 14px; }
.crumbs a { color: var(--teal); }
.art-date { color: var(--ink-3); font-size: 0.9rem; margin: -2px 0 16px; }
.art-date a { color: var(--teal); }
.keypoints { background: var(--wash); border-radius: 16px; padding: 20px 24px; margin-top: 8px; }
.keypoints h2 { font-size: 1.05rem; margin: 0 0 6px; }
.keypoints .ticks li { border-bottom-color: var(--line-2); }
.art-body table.cmp { margin: 14px 0 6px; }
.ui-table.kv td:first-child { color: var(--ink); font-weight: 550; white-space: nowrap; }
.ui-table.cmp tr.us td { background: rgba(244,196,48,.14); font-weight: 600; }
.guide-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.guide-list a { display: grid; gap: 6px; border: 1px solid var(--line-2); border-radius: 16px; padding: 18px 20px; }
.guide-list a:hover { border-color: var(--teal); }
.guide-list b { font-size: 1.04rem; letter-spacing: -0.01em; }
.guide-list span { color: var(--ink-2); font-size: 0.92rem; }
.guide-list em { font-style: normal; color: var(--ink-3); font-size: 0.82rem; }
.sources { padding-left: 20px; } .sources a { color: var(--teal); }
.examples { padding-left: 20px; display: grid; gap: 14px; }
.examples p { margin: 0; color: var(--ink-2); }
.examples .calc-line { margin-top: 4px; font-size: 0.93rem; color: var(--ink-3); }
.examples .calc-line b { color: var(--ink); }
.faq-toc { display: flex; flex-wrap: wrap; gap: 8px; }
.faq-toc a { font-size: 0.92rem; border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 14px; }
.faq-toc a:hover { border-color: var(--teal); color: var(--teal); }
@media (max-width: 960px) {
  .uses-3, .guide-list { grid-template-columns: minmax(0, 1fr); }
  .ui-table.kv td:first-child { white-space: normal; }
}

/* ---------- status page ---------- */
.st-now { display: inline-flex; align-items: center; gap: 12px; padding: 12px 18px; border-radius: 14px; background: var(--wash); font-size: 1.1rem; }
.st-now i { width: 12px; height: 12px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.st-now.st-degraded i { background: #E5A00D; box-shadow: 0 0 0 4px rgba(229,160,13,.18); }
.st-now.st-down i { background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.st-bars { display: grid; grid-template-columns: repeat(90, minmax(0, 1fr)); gap: 2px; height: 38px; }
.st-bars span { border-radius: 2px; background: var(--ok); }
.st-bars .degraded { background: #E5A00D; } .st-bars .down { background: var(--red); } .st-bars .nodata { background: var(--line-2); }
.st-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; font-size: .86rem; color: var(--ink-3); }
.st-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.st-legend .ok { background: var(--ok); } .st-legend .degraded { background: #E5A00D; } .st-legend .down { background: var(--red); } .st-legend .nodata { background: var(--line-2); }
@media (max-width: 560px) { .st-bars { grid-template-columns: repeat(45, minmax(0, 1fr)); height: 60px; } .st-bars span:nth-child(-n+45) { display: none; } }

/* screenshots in docs and guides (dlm_shot) */
figure.shot { margin: 26px 0 30px; }
figure.shot img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 30px -18px rgba(15,43,58,.35); background: #fff; }
figure.shot figcaption { margin-top: 10px; font-size: .88rem; color: var(--ink-3, #5b6b75); line-height: 1.45; }

/* article covers (assets/covers, dlm_cover) and their thumbnails in lists */
figure.cover { margin: 6px 0 22px; }
figure.cover img { display: block; width: 100%; height: auto; aspect-ratio: 1344 / 768; object-fit: cover; border-radius: 18px; background: var(--wash); }
.guide-list img.thumb { display: block; width: calc(100% + 40px); max-width: none; height: auto; aspect-ratio: 16 / 9; object-fit: cover; margin: -18px -20px 6px; border-radius: 15px 15px 0 0; background: var(--wash); }

/* tables on public pages: words never break in the middle; on phones a table that does not fit scrolls inside itself */
.sec .ui-table td, .sec .ui-table th { overflow-wrap: normal; word-break: normal; }
.sec .ui-table th { white-space: normal; }
.sec .ui-table code { overflow-wrap: break-word; }
@media (max-width: 760px) {
  .sec .ui-table:not(.stack) { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
  .sec .ui-table:not(.stack) th, .sec .ui-table:not(.stack) td { padding: 8px 10px; }
  .sec .ui-table.cmp td:first-child, .sec .ui-table.cmp th:first-child { min-width: 8.5em; }
  .sec .ui-table.kv:not(.cmp) td:first-child { min-width: 7em; }
}
/* buttons with long translated labels wrap instead of pushing the page wider */
.btn-buoy, .btn-line { max-width: 100%; }
@media (max-width: 560px) { .btn-buoy, .btn-line { white-space: normal; text-align: center; line-height: 1.3; padding-top: 10px; padding-bottom: 10px; } }

/* home: "let your AI agent do it" */
#agent .agent-mail { display: grid; gap: 6px; max-width: 420px; margin: 18px 0 14px; }
#agent .agent-mail label { font-weight: 600; font-size: .95rem; }
#agent .agent-mail input { font: inherit; padding: 11px 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); color: var(--ink); }
#agent .agent-mail small { color: var(--ink-3); font-size: .82rem; }
#agent pre.agent-prompt { white-space: pre-wrap; word-break: break-word; font-size: .9rem; line-height: 1.55; }
#agent .agent-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
