/* ---- Take-home section (scoped to .th) ---- */
.top .rail a.first-th { margin-left: 10px; }
.th { --amp: #c8553d; --kimi: #6f9fdc; --glm: #7fae7a; --luna: #5f6670; --ok: #2e8b57; --okbg: #e6f4ea;
  --warn: #c89100; --warnbg: #fff6d9; --bad: #c0504d; --badbg: #fde7e8; --env: #eef3fb; --envs: #9db8e0;
  --harn: #f3eefb; --harns: #b9a3e0; --agt: #fbeee9; --agts: #e0a48f; }
.th .th-row { display: grid; column-gap: 22px; align-items: start; }
.th svg { width: 100%; height: auto; display: block; overflow: visible; font-family: var(--sans); }
.th svg text { fill: #3b3935; }
.th .lbl { font-size: 13px; } .th .nm { font-size: 14px; font-weight: 600; fill: var(--ink); } .th .val { font-size: 13px; font-weight: 600; fill: var(--ink); }

/* hover pop-up */
.th-tip { position: fixed; z-index: 50; max-width: 380px; background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 6px 22px rgba(0,0,0,.10); padding: 10px 13px; font: 13.5px/1.45 var(--sans); color: var(--ink); pointer-events: none;
  opacity: 0; transition: opacity .12s ease; }
.th-tip.on { opacity: 1; } .th-tip b { display: block; font-weight: 600; margin-bottom: 3px; }
[data-tip] { cursor: help; }

/* quotes */
.th .th-quotes { display: grid; row-gap: 16px; margin-top: 8px; }
.th .th-q { border-left: 3px solid #cdb555; padding: 6px 0 6px 18px; }
.th .th-q p { margin: 0; font: 400 24px/1.4 var(--serif); color: var(--ink); max-width: 46ch; }
.th .th-q span { display: block; margin-top: 6px; font-size: 13.5px; color: var(--muted); }
.th .th-big { font: 400 26px/1.4 var(--serif); color: var(--ink); max-width: 52ch; margin: 8px 0 18px; }
.th .th-ask { font: 600 20px/1.45 var(--serif); color: var(--ink); max-width: 60ch; margin: 6px 0 14px; }
.th .th-chips { display: grid; grid-template-columns: repeat(4, 1fr); column-gap: 14px; }
.th .th-chip { border: 1px solid var(--line); border-top: 3px solid #cdb555; border-radius: 10px; padding: 12px 14px; background: #fff; }
.th .th-chip b { display: block; font: 600 17px var(--serif); } .th .th-chip span { display: block; font-size: 13.5px; line-height: 1.45; color: #3b3935; margin-top: 4px; }

/* comparison table */
.th table.th-cmp { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.th table.th-cmp th, .th table.th-cmp td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.th table.th-cmp th { font: 600 15px var(--serif); color: var(--ink); }
.th table.th-cmp td:first-child { color: var(--muted); width: 190px; }
.th table.th-cmp .us { background: #fbf6e1; }
.th table.th-cmp th.us { border-top: 2px solid #cdb555; border-radius: 8px 8px 0 0; }
.th .y { color: var(--ok); font-weight: 600; } .th .n { color: var(--faint); } .th .p { color: #8a6a1e; font-weight: 600; }

/* building a project */
.th .th-flow { display: flex; align-items: center; gap: 10px; margin: 2px 0 14px; font-size: 14px; }
.th .th-flow div { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; background: #fff; }
.th .th-flow i { color: var(--faint); font-style: normal; }

/* environment, harness, agent */
.th .th-layer { border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
.th .th-layer > b { display: block; font: 600 17px var(--serif); margin-bottom: 8px; }
.th .th-env { background: var(--env); border: 1.5px solid var(--envs); }
.th .th-harn { background: var(--harn); border: 1.5px solid var(--harns); }
.th .th-agt { background: var(--agt); border: 1.5px solid var(--agts); }
.th .th-env .th-cols { display: grid; grid-template-columns: 0.8fr 2fr 1fr; column-gap: 12px; }
.th .th-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.th .th-card h4 { margin: 0 0 6px; font: 600 15px var(--serif); }
.th .th-card p { margin: 0; font-size: 13.5px; line-height: 1.45; }
.th .th-sub { font-size: 12.5px; font-weight: 600; color: #3b3935; margin: 8px 0 4px; }
.th .th-line { background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 13.5px; }
.th pre.th-mono { margin: 0; background: #fbfaf8; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: 11.5px/1.5 var(--mono); white-space: pre-wrap; color: var(--ink); }
.th .th-outs { display: grid; grid-template-columns: repeat(4, 1fr); column-gap: 12px; margin-top: 4px; }
.th .th-out { border: 2px solid; border-radius: 10px; padding: 8px 12px; text-align: center; font: 600 15px var(--serif); background: #fff; }
.th .th-formula { text-align: center; font: 600 18px var(--serif); margin-top: 12px; }

/* chat windows */
.th .chat { display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; font-family: "Lato", var(--sans); }
.th .win { border: 1px solid #e3e3e3; border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 3px 10px rgba(0,0,0,.06); }
.th .win-h { background: #3f0e40; color: #fff; padding: 11px 16px; display: flex; justify-content: space-between; align-items: center; }
.th .win-h b { font-size: 16px; } .th .win-h span { font-size: 13px; color: #d8c9d8; }
.th .win-b { padding: 10px 12px 12px; min-height: 330px; }
.th .day { display: flex; align-items: center; gap: 10px; margin: 8px 0; font-size: 12.5px; font-weight: 700; color: #1d1c1d; }
.th .day::before, .th .day::after { content: ""; flex: 1; height: 1px; background: #e8e8e8; }
.th .day span { border: 1px solid #e3e3e3; border-radius: 999px; padding: 2px 12px; background: #fff; }
.th .msg { display: grid; grid-template-columns: 36px 1fr; column-gap: 10px; padding: 7px 10px; border-radius: 12px; margin: 4px 0; position: relative; }
.th .msg .av { width: 34px; height: 34px; border-radius: 8px; color: #fff; font-weight: 700; display: grid; place-items: center; }
.th .msg .who { font-weight: 700; font-size: 14.5px; color: #1d1c1d; } .th .msg .who em { font-style: normal; font-weight: 400; font-size: 12.5px; color: #616061; margin-left: 8px; }
.th .msg .tx { font-size: 14.5px; line-height: 1.45; color: #1d1c1d; }
.th .msg.warn { background: var(--okbg); border: 1.5px solid var(--ok); }
.th .msg.read { background: var(--warnbg); border: 1.5px solid var(--warn); }
.th .msg.dec { background: var(--badbg); border: 1.5px solid var(--bad); }
.th .msg .tag { position: absolute; right: 10px; top: 8px; color: #fff; font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 2px 10px; }
.th .bar { border-radius: 14px; padding: 9px 16px; font-size: 15px; margin-top: 10px; font-family: "Lato", var(--sans); }
.th .bar.bad { background: var(--badbg); border: 1.5px solid var(--bad); font-weight: 700; }
.th .bar.good { background: var(--okbg); border: 1.5px solid var(--ok); }

/* facts and cards */
.th .th-facts { display: grid; row-gap: 10px; }
.th .th-fact { border-left: 3px solid #cdb555; padding: 2px 0 2px 12px; }
.th .th-fact b { display: block; font: 600 16px/1.3 var(--serif); } .th .th-fact p { margin: 3px 0 0; font-size: 13.5px; line-height: 1.45; color: #3b3935; }
.th .th-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.th img.th-img { width: 100%; height: auto; display: block; }

/* slider and selectors */
.th .th-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; margin: 2px 0 10px; }
.th .th-seg button { border: 0; background: #fff; padding: 6px 14px; font: 500 13px var(--sans); cursor: pointer; color: #3b3935; }
.th .th-seg button + button { border-left: 1px solid var(--line); }
.th .th-seg button.on { background: var(--ink); color: #fff; }
.th .th-side { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff; min-height: 300px; }
.th .th-side h4 { margin: 0 0 4px; font: 600 15px var(--serif); }
.th .th-side .meta { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.th .th-side .th-ex { font-size: 14px; line-height: 1.5; }
.th .th-side .q { border-left: 3px solid var(--line); padding-left: 10px; margin: 6px 0; font-size: 14px; line-height: 1.5; }
.th .th-side .chg { display: grid; grid-template-columns: 1fr; row-gap: 4px; margin-top: 6px; }
.th .th-side .chg div { font: 12.5px/1.4 var(--mono); border-radius: 6px; padding: 4px 8px; background: var(--soft); }
.th .th-side .chg div.plant { background: var(--okbg); }
.th .th-side .chg div.extra { background: var(--badbg); }
.th .th-side .nav { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0; }
.th .th-side .nav button { border: 1px solid var(--line); background: #fff; border-radius: 6px; min-width: 28px; padding: 3px 6px; font: 12px var(--sans); cursor: pointer; }
.th .th-side .nav button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.th .seg-click { cursor: pointer; }
.th .seg-click:hover { filter: brightness(0.93); }

/* two warnings */
.th .two { display: grid; grid-template-columns: 1fr 1.45fr; column-gap: 18px; align-items: start; }
.th .two .msg { border: 1px solid #e3e3e3; background: #fff; }
.th .two .msg mark { background: #fff1b8; padding: 0 2px; border-radius: 3px; }
.th .two .msg .soft { background: #fde7e8; border-radius: 3px; padding: 0 2px; }
.th .two h5 { margin: 0 0 6px; font: 600 15px var(--serif); }
.th .pros { display: grid; grid-template-columns: 1fr 1.45fr; column-gap: 18px; margin-top: 10px; font-size: 14px; line-height: 1.5; }

/* fixes */
.th .th-tabs { display: grid; grid-template-columns: repeat(4, 1fr); column-gap: 10px; margin-bottom: 14px; }
.th .th-tab { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; cursor: pointer; text-align: left; font-family: var(--sans); }
.th .th-tab small { display: block; font-size: 11px; color: var(--faint); letter-spacing: .06em; }
.th .th-tab b { display: block; font: 600 16px var(--serif); color: var(--ink); }
.th .th-tab span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.th .th-tab.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset; }
.th .th-fix { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 12px; }
.th .th-box { border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; min-height: 150px; background: #fbfaf8; transition: all .25s ease; }
.th .th-box h4 { margin: 0 0 6px; font: 600 17px var(--serif); color: var(--faint); }
.th .th-box p { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--faint); }
.th .th-box.lit { background: #fff; border-color: var(--ok); box-shadow: 0 4px 14px rgba(46,139,87,.12); }
.th .th-box.lit h4 { color: var(--ink); } .th .th-box.lit p { color: var(--ink); }
.th .th-env-first { font-size: 14.5px; line-height: 1.5; border: 1px solid #cdb555; background: #fbf6e1; border-radius: 10px; padding: 9px 14px; margin-bottom: 12px; }

/* simple lists */
.th ul.th-list { margin: 6px 0 0; padding-left: 20px; font-size: 16px; line-height: 1.6; }
.th ul.th-list li { margin: 4px 0; }
.th table.th-tbl { border-collapse: collapse; font-size: 14px; } .th table.th-tbl td, .th table.th-tbl th { padding: 6px 14px; border-bottom: 1px solid var(--line); text-align: right; }
.th table.th-tbl td:first-child, .th table.th-tbl th:first-child { text-align: left; }
.th .th-acc { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; margin-top: 10px; font-size: 14.5px; }
.th .th-acc i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; }
.th .th-small { font-size: 13px; line-height: 1.5; color: var(--ink); margin-top: 14px; }
.th-thanks { height: 100%; min-height: 460px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.th-thanks h1 { font: 600 52px/1.1 var(--serif); margin: 18px 0 0; }
.th-thanks .wave { font-size: 84px; display: inline-block; transform-origin: 70% 75%; animation: th-wave 2.2s ease-in-out infinite; }
@keyframes th-wave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(16deg); } 20%, 40% { transform: rotate(-8deg); } 50% { transform: rotate(10deg); } }
@media (prefers-reduced-motion: reduce) { .th-thanks .wave { animation: none; } }
