/* Client portal. Warm white, teal accents, editorial type. No sidebars, no decorative motion. */
:root {
  --bg: #fbf8f2;
  --paper: #ffffff;
  --sand: #f3ece0;
  --line: #e4dccc;
  --ink: #1c2a2b;
  --ink-soft: #4a5b5c;
  --teal: #0b6e6b;
  --teal-deep: #084f4d;
  --teal-wash: #e3f0ee;
  --danger: #8a3b2a;
  --danger-wash: #f8e9e4;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "Kumbh Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 18px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap { width: min(1080px, 100% - 2.5rem); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .75rem 1rem; z-index: 10; }
.skip:focus { left: 0; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
main:focus { outline: none; }

/* header */
.top { border-bottom: 1px solid var(--line); }
.top-inner { display: flex; align-items: center; gap: .75rem; padding-block: .75rem; }
.brand { font-weight: 700; font-size: 1rem; letter-spacing: .01em; margin-right: auto; }
.brand-sub { font-weight: 500; color: var(--ink-soft); margin-left: .35rem; }
.brand-sub::before { content: "·"; margin-right: .5rem; }
.btn-small { min-height: 44px; padding: .3rem 1.1rem; font-size: .95rem; }

/* hero: title + small characters in one short row, never pushes the next action down */
.hero { display: grid; grid-template-columns: 1fr auto; column-gap: 1rem; align-items: center; padding-block: 1.25rem .75rem; }
.hero h1 { font-size: clamp(1.9rem, 6vw, 3.2rem); max-width: 18ch; }
.hero-art img { width: 120px; height: 120px; object-fit: contain; }
.lede { grid-column: 1 / -1; margin-top: .5rem; font-size: 1.1rem; color: var(--ink-soft); max-width: 36rem; }
@media (min-width: 860px) {
  .hero { grid-template-columns: 1fr 200px; grid-template-rows: auto auto; padding-block: 1rem .5rem; max-height: 300px; }
  .hero h1 { align-self: end; }
  .hero-art { grid-column: 2; grid-row: 1 / span 2; }
  .hero-art img { width: 200px; height: 200px; }
  .lede { grid-column: 1; align-self: start; font-size: 1.2rem; }
}

/* blocks */
.block { padding-block: 2rem; border-top: 1px solid var(--line); }
.block-head { display: grid; gap: 1.25rem; margin-bottom: 1.75rem; }
.block h2 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); }
.block-note { color: var(--ink-soft); max-width: 40rem; }
@media (min-width: 860px) {
  .block-head { grid-template-columns: 1fr 1fr; align-items: end; }
  .block-head .block-note { grid-column: 1 / -1; }
}

/* next action */
.next { margin-block: .5rem 2rem; }
.next-card {
  background: var(--paper); border: 1px solid var(--line); border-left: 8px solid var(--teal);
  border-radius: var(--radius); padding: clamp(1.1rem, 3vw, 1.6rem); display: grid; gap: 1rem;
}
.next-card.is-ask { border-left-color: #b45f06; }
.next-main { display: grid; gap: .6rem; justify-items: start; align-content: start; }
.kicker { font-size: .85rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--teal-deep); }
.is-ask .kicker { color: #8a4700; }
.next-title { font-family: var(--serif); font-size: clamp(1.5rem, 4vw, 2.2rem); line-height: 1.15; font-weight: 600; }
.next-side { display: grid; gap: .5rem; align-content: start; }
.fact { font-size: 1rem; line-height: 1.5; }
.fact-label { font-weight: 700; color: var(--teal-deep); }
.next-sub, .next-empty { color: var(--ink-soft); }
@media (min-width: 860px) { .next-card { grid-template-columns: 1fr 1.2fr; gap: 2rem; align-items: start; } }

/* progress */
.progress { display: grid; gap: .5rem; }
.progress-text { font-weight: 700; }
.bar { height: 12px; background: var(--sand); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.bar-fill { display: block; height: 100%; width: 0; background: var(--teal); border-radius: 999px; }

/* cards */
.cards { display: grid; gap: 1.25rem; }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(2, 1fr); } }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; display: grid; gap: .75rem; align-content: start; grid-template-columns: 96px 1fr; column-gap: 1.25rem;
}
.card img { grid-row: 1 / span 5; width: 96px; height: 96px; object-fit: contain; align-self: center; }
.card > :not(img) { grid-column: 2; }
.card h3 { font-size: 1.35rem; }
.card .chip, .card .link-open { justify-self: start; }
.card.is-next { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal); }
.card.is-done { background: var(--teal-wash); border-color: #bfdcd8; }
.more { margin-top: 1.25rem; }
@media (max-width: 420px) {
  .card { grid-template-columns: 1fr; }
  .card img { grid-row: auto; width: 88px; height: 88px; }
  .card > :not(img) { grid-column: 1; }
}

.chip { display: inline-block; font-size: .9rem; font-weight: 700; padding: .2rem .8rem; border-radius: 999px; background: var(--sand); color: var(--ink); border: 1px solid var(--line); }
.chip-ask { background: #fdf0dc; border-color: #e3b877; color: #6b3a00; }
.chip-done { background: var(--teal-wash); color: var(--teal-deep); border-color: #bfdcd8; }

/* links + buttons */
.btn, .link-open, .link-quiet { font-family: var(--sans); font-weight: 700; text-decoration: none; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: .6rem 1.6rem;
  border-radius: 999px; border: 2px solid transparent; font-size: 1.05rem; cursor: pointer; line-height: 1.2;
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-deep); }
.btn-primary:disabled { background: var(--ink-soft); cursor: not-allowed; }
#dump-input:disabled { background: var(--sand); cursor: not-allowed; }
.btn-quiet { background: transparent; color: var(--teal-deep); border-color: var(--teal); }
.btn-quiet:hover { background: var(--teal-wash); }
.link-open { color: var(--teal-deep); border-bottom: 2px solid var(--teal); padding-block: .25rem; min-height: 44px; display: inline-flex; align-items: center; }
.link-open::after { content: " →"; white-space: pre; }
.link-open:hover { background: var(--teal-wash); }
.link-quiet { color: var(--teal-deep); text-decoration: underline; text-underline-offset: 4px; }

/* brain dump */
.braindump { display: grid; gap: 1.5rem; align-items: center; }
.dump-art img { width: min(45vw, 240px); margin-inline: auto; }
.dump-main h2 { margin-bottom: 1.25rem; }
#dump-form label { display: block; font-weight: 700; margin-bottom: .5rem; }
.dump-row { display: grid; gap: .75rem; }
#dump-input {
  width: 100%; min-height: 56px; padding: .75rem 1.1rem; font: inherit; color: var(--ink);
  background: var(--paper); border: 2px solid var(--ink-soft); border-radius: 14px;
}
#dump-input:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-color: var(--teal); }
.help { margin-top: .6rem; font-size: .95rem; color: var(--ink-soft); }
.form-msg { min-height: 1.6em; margin-top: .4rem; font-weight: 700; color: var(--teal-deep); }
.form-msg.is-error { color: var(--danger); }
@media (min-width: 560px) { .dump-row { grid-template-columns: 1fr auto; } }
@media (min-width: 860px) { .braindump { grid-template-columns: 260px 1fr; gap: 3rem; } }

/* ideas */
.counts { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }
.count-chip { display: inline-flex; gap: .5rem; align-items: baseline; padding: .25rem .9rem; border-radius: 999px; background: var(--sand); border: 1px solid var(--line); font-size: .95rem; color: var(--ink-soft); }
.count-chip strong { color: var(--ink); }
.count-chip.has-items { background: var(--teal-wash); border-color: #bfdcd8; color: var(--teal-deep); }
.groups { display: grid; gap: 1rem; }
@media (min-width: 860px) { .groups { grid-template-columns: repeat(2, 1fr); align-items: start; } }
.group { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.4rem; }
.group h3 { font-size: 1.3rem; }
.group-note { margin-top: .3rem; font-size: .95rem; color: var(--ink-soft); }
.idea-list { margin-top: .6rem; display: grid; }
.idea-link { display: block; padding: .5rem 0; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); min-height: 44px; overflow-wrap: anywhere; }
.idea-link:hover { color: var(--teal-deep); text-decoration: underline; text-underline-offset: 4px; }
.group-approved { border-color: var(--teal); background: var(--teal-wash); padding-block: .9rem; }
.group-approved h3 { font-size: 1.15rem; }
.group-odrzut { background: var(--sand); }
.group-odrzut summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }

/* states */
.state { display: grid; gap: 1rem; justify-items: start; padding: 1.5rem; border-radius: var(--radius); background: var(--sand); color: var(--ink); }
.state-error, .notice-error { background: var(--danger-wash); }
.state-loading { color: var(--ink-soft); }
.notice { display: grid; gap: 1rem; justify-items: start; padding: 1.25rem 1.5rem; border-radius: var(--radius); margin-block: 1rem; }

/* footer */
.foot { border-top: 1px solid var(--line); margin-top: 2rem; background: var(--sand); }
.foot-inner { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center; padding-block: 1.75rem; font-size: 1rem; color: var(--ink-soft); }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

.idea-actions { display:flex; flex-wrap:wrap; gap:.5rem; margin-top:.6rem; }
.idea-list > li { padding-block:.75rem; }
