/* styles4.css -- the four-chapter journey: the fork, the narrator line, the "bad year" cards, the balance bar, the picker and the two-sides card.
   Reuses the tokens in styles.css; adds only a warm gold for sunshine and a muted slate-violet for clouds (no alarm red). */
:root { --sun-soft: #f8efcf; --sun-line: #d8b84a; --sun-ink: #7a5b08; --cloud-soft: #e4e6ee; --cloud-line: #9a9fba; --cloud-ink: #4b4f6e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --sun-soft: #3a3014; --sun-line: #b8962f; --sun-ink: #e0b84a; --cloud-soft: #232738; --cloud-line: #5b607f; --cloud-ink: #b4b9d8; } }
:root[data-theme="dark"] { --sun-soft: #3a3014; --sun-line: #b8962f; --sun-ink: #e0b84a; --cloud-soft: #232738; --cloud-line: #5b607f; --cloud-ink: #b4b9d8; }

/* the narrator: where you are, what is happening, what is next */
.narrator { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); border: 1px solid var(--line); border-radius: 6px; background: var(--sea-soft); margin: 10px 0 16px; overflow: hidden; }
.narrator > div { padding: 10px 14px; border-right: 1px solid var(--line); font-size: 14px; }
.narrator > div:last-child { border-right: 0; }
.narrator b { display: block; color: var(--sea); font-size: 12px; letter-spacing: .8px; text-transform: uppercase; margin-bottom: 2px; }
@media (max-width: 640px) { .narrator > div { border-right: 0; border-bottom: 1px solid var(--line); } .narrator > div:last-child { border-bottom: 0; } }

/* the fork */
.fork { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin: 10px 0 14px; }
.door { display: flex; flex-direction: column; gap: 4px; }
.door h3 { font-family: Charter, Georgia, serif; font-size: 22px; margin: 6px 0 2px; }
.door .btn { margin-top: auto; }
.welcome h1 { max-width: 20ch; }

/* "a bad year" cards */
.opt .low { display: block; color: var(--sea); font-size: 15px; font-weight: 700; margin: 4px 0 2px; }
.opts .opt { display: flex; flex-direction: column; gap: 2px; }

/* the sleeve bar and the plain-words list */
.sbar { display: flex; height: 32px; border: 1.5px solid var(--ink); border-radius: 6px; overflow: hidden; margin: 4px 0 10px; }
.sbar i { display: block; font-style: normal; font-size: 12px; font-weight: 700; padding: 6px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.sbar i.core { background: var(--sea-soft); } .sbar i.sat { background: var(--amber-soft); } .sbar i.cush { background: var(--ok-soft); }
.sleeveleg { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; margin-bottom: 6px; }
.sleeveleg span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; border: 1px solid var(--ink); vertical-align: -1px; }
.sleeveleg .core::before { background: var(--sea-soft); } .sleeveleg .sat::before { background: var(--amber-soft); } .sleeveleg .cush::before { background: var(--ok-soft); }
.mixwords { padding-left: 20px; margin: 6px 0 8px; max-width: 74ch; } .mixwords li { margin-bottom: 4px; }
.chipish { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); margin: 0 2px 3px 0; }
.chipish.core { border-color: var(--sea); } .chipish.satellite { border-color: var(--amber); }
.linkbtn { background: none; border: 0; color: var(--sea); text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }
details.more { margin: 10px 0; }
details.more > summary { cursor: pointer; font-weight: 600; padding: 8px 0; }

/* the picker */
.pickfilters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 6px 0 10px; }
.pickfilters select, .pickfilters input { font: inherit; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--ink); }
.pickrow { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pickrow:last-child { border-bottom: 0; }

/* the two-sides card */
.sides { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-top: 8px; }
.side { border-radius: 6px; padding: 12px 14px; border: 1.5px solid var(--line); }
.side h3 { font-family: Charter, Georgia, serif; font-size: 18px; margin: 2px 0 6px; }
.side.sun { background: var(--sun-soft); border-color: var(--sun-line); } .side.sun .eyebrow { color: var(--sun-ink); }
.side.cloud { background: var(--cloud-soft); border-color: var(--cloud-line); } .side.cloud .eyebrow { color: var(--cloud-ink); }
.recover { margin-top: 10px; padding: 8px 12px; border-radius: 6px; background: var(--sea-soft); border: 1px solid var(--line); } .recover ul { margin: 4px 0 0; padding-left: 18px; }

/* the Compare view */
.cmpsum { margin: 8px 0 10px; padding-left: 20px; max-width: 74ch; } .cmpsum li { margin-bottom: 4px; }
.cmp .tbl tr.hl td { background: var(--sea-soft); }

/* the fund fact card and the cushion honesty panel */
.factcard { margin: 6px 0 10px 14px; padding: 10px 14px; border-left: 3px solid var(--sea); background: var(--panel2); border-radius: 0 6px 6px 0; }
.factcard ul { margin: 4px 0 8px; padding-left: 18px; }
.verdict { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; border: 1px solid var(--line); }
.verdict.steady { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }
.verdict.softened { background: var(--amber-soft); color: var(--amber); border-color: var(--amber); }
.verdict.with-core { background: var(--cloud-soft); color: var(--cloud-ink); border-color: var(--cloud-line); }
.verdict.unknown { background: var(--panel2); color: var(--muted); }
.cushioncard tr.hl td { background: var(--sea-soft); }

/* the measured swing table */
.swing td { vertical-align: top; }
.swing tr.mine td { background: var(--sea-soft); }
.swingbar { height: 8px; background: var(--line); border-radius: 4px; margin-bottom: 3px; min-width: 90px; }
.swingbar i { display: block; height: 8px; border-radius: 4px; }
.swingbar i.calmer { background: var(--ok); } .swingbar i.same { background: var(--sea); } .swingbar i.more { background: var(--amber); }

.swing tr.head td { border-bottom: 0; padding-bottom: 2px; }
.swing tr.plain td { padding-top: 0; }
.swing tr.head td:first-child { min-width: 130px; }

/* phone: thumb-sized controls, and 16px text in fields so iOS does not zoom the page when one is tapped */
@media (max-width: 640px) {
  .layers button, .seg button { min-height: 40px; padding: 8px 14px; }
  .linkbtn { padding: 10px 0; min-height: 40px; }
  details.more > summary { padding: 12px 0; min-height: 40px; }
  input[type="number"], input[type="text"], input:not([type]), select, .pickfilters select, .pickfilters input { min-height: 40px; font-size: 16px; }
  input[type="checkbox"], input[type="radio"] { width: 22px; height: 22px; }
}
