:root {
  color-scheme: light;
  --ink: #1b2b24;
  --muted: #54655b;
  --paper: #f4f6f1;
  --surface: #fff;
  --line: #dce5dc;
  --forest: #172d28;
  --action: #204e3c;
  --action-hover: #12392a;
  --leaf: #dceba9;
  --soft-green: #e7f0e5;
  --soft-purple: #ebe8f8;
  --soft-amber: #fbefd7;
  --danger: #8d3026;
  font: 16px/1.5 "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; }
a { color: inherit; text-decoration: none; }
button, select, input, textarea { font: inherit; color: inherit; }
button, select { cursor: pointer; }
svg { flex: 0 0 auto; vertical-align: middle; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, .item-copy, .prose { overflow-wrap: anywhere; }
button:disabled { opacity: .58; cursor: wait; }
:focus-visible { outline: 3px solid #456b34; outline-offset: 3px; }
h1:focus-visible { outline: none; }
.notice {
  position: fixed; right: 20px; bottom: 20px; max-width: min(440px, calc(100vw - 40px));
  z-index: 3; background: var(--forest); color: white; border-radius: 12px; padding: 14px 19px;
  box-shadow: 0 8px 25px #0e241b22;
}
.notice:empty { padding: 0; }
.loading { padding: 32px; color: var(--muted); }

.workspace { min-height: 100dvh; display: grid; grid-template-columns: 228px minmax(0, 1fr); }
.sidebar {
  align-self: start; position: sticky; top: 0; min-height: 100dvh; display: flex; flex-direction: column;
  gap: 44px; padding: 31px 17px 19px; background: var(--forest); color: #eef4ed;
}
.sidebar :focus-visible { outline-color: var(--leaf); }
.brand { display: inline-flex; align-items: center; gap: 11px; width: fit-content; }
.sidebar .brand { margin: 0 9px; }
.logo-mark {
  display: grid; place-items: center; width: 40px; height: 40px;
  flex: 0 0 auto; border-radius: 12px; background: var(--leaf); color: var(--forest);
}
.logo-words { display: flex; align-items: center; gap: 7px; font-size: 23px; font-weight: 720; letter-spacing: -.6px; }
.logo-words span {
  font-size: 11px; letter-spacing: 0; font-weight: 650; color: #c9dbc9;
  padding: 1px 5px; border: 1px solid #ffffff32; border-radius: 5px;
}
.sidebar nav { display: grid; gap: 5px; }
.sidebar nav a {
  display: flex; min-height: 47px; align-items: center; gap: 12px;
  padding: 0 13px; border-radius: 8px; color: #d2e0d6; font-weight: 590;
}
.sidebar nav a:hover, .sidebar nav a[aria-current] { background: #2b493e; color: #fff; }
.sidebar nav a[aria-current] { box-shadow: inset 3px 0 var(--leaf); }
.sidebar nav a[aria-current] svg { color: var(--leaf); }
.sidebar-bottom { margin-top: auto; }
.account { display: flex; align-items: center; gap: 9px; padding: 13px 0 0 6px; border-top: 1px solid #ffffff24; }
.account > div { min-width: 0; flex: 1; }
.account strong, .account small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.account strong { font-size: .88rem; }
.account small { font-size: .75rem; color: #cbdbd0; }
.avatar {
  display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px;
  border-radius: 50%; background: #ceddd3; color: var(--forest); font-weight: 720;
}
.icon-button {
  display: inline-grid; place-items: center; min-width: 44px; min-height: 44px;
  border: 0; border-radius: 8px; background: transparent; color: #dae9df;
}
.icon-button:hover { background: #ffffff19; }

.main-content { width: min(100%, 1310px); padding: 27px clamp(22px, 4vw, 58px) 55px; }
.topline {
  display: flex; justify-content: space-between; gap: 16px;
  border-bottom: 1px solid var(--line); padding-bottom: 15px; color: var(--muted); font-size: .88rem;
}
.page-heading {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 20px;
  margin: 26px 0 21px;
}
.page-heading h1, .gate h1, .fallback h1 {
  font-size: clamp(2.2rem, 3.8vw, 3.35rem); line-height: 1.06; letter-spacing: -.06em; font-weight: 730;
}
.page-heading p { max-width: 58ch; margin-top: 9px; color: var(--muted); overflow-wrap: anywhere; }
.page-heading > .button { flex-shrink: 0; }
.button {
  display: inline-flex; min-height: 44px; width: fit-content; justify-content: center; align-items: center;
  gap: 8px; border: 1px solid transparent; border-radius: 9px; padding: 9px 14px; font-weight: 650; text-align: center;
}
.primary, .hero-button { background: var(--action); color: white; }
.primary:hover, .hero-button:hover { background: var(--action-hover); }
.secondary { background: var(--surface); border-color: #cbd9ce; color: var(--action); }
.secondary:hover { background: var(--soft-green); }
.quiet { min-height: 44px; padding: 7px 8px; color: var(--muted); border: 0; border-radius: 8px; background: none; }
.quiet:hover { background: var(--soft-green); color: var(--ink); }
.back { display: inline-flex; min-height: 44px; align-items: center; gap: 6px; color: var(--action); margin-top: 10px; }
.back:hover { text-decoration: underline; }
.back + .page-heading { margin-top: 8px; }

.next-task {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) clamp(150px, 28vw, 286px);
  align-items: center; margin-bottom: 23px; overflow: hidden; border: 1px solid #c9dc92; border-radius: 16px;
  background: var(--leaf);
}
.next-copy { padding: 27px 0 29px 30px; z-index: 1; }
.next-label { color: #344a26; font-weight: 660; font-size: .9rem; }
.next-copy h2 { font-size: clamp(1.65rem, 3.2vw, 2.7rem); line-height: 1.09; margin-top: 6px; letter-spacing: -.04em; max-width: 22ch; }
.next-meta { margin: 9px 0 17px; color: #344a26; font-size: .88rem; overflow-wrap: anywhere; }
.item-copy small span::before, .next-meta span::before { content: "·"; margin: 0 5px 0 2px; }
.deck-art { height: 183px; position: relative; align-self: center; width: 100%; }
.deck-card {
  position: absolute; top: 34px; left: calc(50% - 58px); width: 104px; height: 119px;
  border: 1px solid #2c4230; border-radius: 12px; box-shadow: 0 4px 0 #283e2c29;
}
.deck-back { transform: translateX(32px) rotate(21deg); background: #9bbc82; }
.deck-mid { transform: translateX(13px) rotate(5deg); background: #f2d594; }
.deck-front { transform: translateX(-8px) rotate(-13deg); background: #f8f6e8; display: flex; flex-direction: column; padding: 13px; }
.deck-front > span:not(.deck-round) { height: 4px; background: #688372; border-radius: 3px; margin-top: 7px; }
.deck-front > span:last-child { width: 51%; }
.deck-round { border-radius: 50%; width: 40px; height: 40px; display: grid; place-items: center; background: var(--forest); color: var(--leaf); margin-bottom: 4px; }

.task-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(225px, .39fr); gap: 20px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; min-width: 0; }
.panel-header { padding: 17px 19px 13px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.panel-header h2, .detail-panel h2 { font-size: 1.14rem; letter-spacing: -.025em; }
.count {
  display: inline-grid; place-items: center; min-width: 25px; padding: 2px 6px;
  border-radius: 20px; color: #315343; background: #eaf2eb; font-size: .78rem; font-weight: 670;
}
.filters { display: flex; flex-wrap: wrap; gap: 3px 8px; padding: 0 19px 10px; }
.filter { border: 0; min-height: 44px; background: transparent; color: var(--muted); border-radius: 7px; padding: 4px 9px; font-size: .88rem; }
.filter[aria-pressed=true], .filter:hover { background: #eaf2eb; color: var(--ink); }
.filter[aria-pressed=true] { font-weight: 680; }
.item-list { margin: 0; list-style: none; padding: 0; }
.item-row {
  display: flex; align-items: center; gap: 12px; min-width: 0; padding: 13px 18px; min-height: 70px;
  border-top: 1px solid var(--line);
}
a.item-row:hover { background: #f7faf6; }
.item-row:focus-visible { outline-offset: -4px; }
.item-icon { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 auto; }
.kind-android { background: var(--soft-green); color: #31563c; }
.kind-prototype { background: var(--soft-purple); color: #51407d; }
.kind-bug { background: #f9eae5; color: #8b3c2d; }
.kind-idea { background: var(--soft-amber); color: #795116; }
.item-copy { display: grid; gap: 2px; min-width: 0; flex: 1; }
.item-copy strong { font-size: .96rem; font-weight: 680; }
.item-copy small, .item-state small { color: var(--muted); font-size: .78rem; }
.item-state { display: grid; gap: 4px; justify-items: end; }
.chevron { color: var(--muted); }
.badge { display: inline-flex; width: fit-content; align-items: center; padding: 3px 8px; border-radius: 7px; background: #eff1ef; color: #425348; font-size: .76rem; font-weight: 670; }
.badge-done, .badge-open, .badge-fixed, .badge-shipped, .badge-tester { background: #e1efdc; color: #2b572c; }
.badge-todo, .badge-pending, .badge-new { background: #f8efd5; color: #6a4c11; }
.badge-review, .badge-in_progress, .badge-planned { background: #ebe8f8; color: #51407d; }
.badge-declined, .badge-blocked { background: #f8eaea; color: #80362b; }
.overview { padding-bottom: 15px; }
.overview-row { display: flex; align-items: center; gap: 10px; min-height: 53px; padding: 5px 17px; }
.overview-row:hover { background: #f7faf6; }
.overview-row .item-icon { width: 33px; height: 33px; }
.overview-row strong { margin-right: auto; font-size: .9rem; }
.overview .button { margin: 13px 15px 0; width: calc(100% - 30px); font-size: .9rem; }
.empty { padding: 19px; border-top: 1px solid var(--line); color: var(--muted); }
.muted { color: var(--muted); }

.detail-body { max-width: 790px; display: grid; gap: 18px; }
.detail-panel { padding: clamp(16px, 3vw, 24px); }
.detail-panel > h2 { margin-bottom: 12px; }
.detail-panel > h3 { margin-top: 15px; font-size: 1rem; }
.detail-panel p + .button, .detail-panel > .form-stack { margin-top: 14px; }
.detail-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 18px; }
.detail-footer p { color: var(--muted); font-size: .88rem; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.prose { white-space: pre-wrap; max-width: 76ch; }
.question-summary { margin: 4px 0 16px; padding-left: 24px; }
.reply { border-top: 1px solid var(--line); }
.reply summary { min-height: 44px; padding: 10px 0; cursor: pointer; font-weight: 650; }
.reply small { color: var(--muted); margin-left: 5px; font-weight: 400; }
dt { font-weight: 650; }
dd { margin: 4px 0 12px; }

.form-stack { display: grid; gap: 15px; }
.form-stack > h2 { margin-bottom: 0; }
.field { display: grid; gap: 5px; min-width: 0; }
.field > span { font-weight: 630; }
.field small { color: var(--muted); font-weight: 400; }
input:not([type=checkbox]), select, textarea {
  width: 100%; min-height: 44px; padding: 9px 10px; border: 1px solid #b9c9bc; border-radius: 8px;
  color: var(--ink); background: var(--surface);
}
textarea { resize: vertical; }
.field-pair { display: grid; grid-template-columns: 1fr 1.25fr; gap: 12px; }
.question-editor { min-inline-size: 0; position: relative; display: grid; gap: 10px; margin: 0; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; }
.question-editor legend { font-weight: 650; padding: 0 5px; }
.question-top { display: flex; flex-wrap: wrap; gap: 5px 12px; justify-content: space-between; }
.checkbox { display: flex; align-items: center; min-height: 44px; gap: 7px; }
.checkbox input { width: 20px; height: 20px; accent-color: var(--action); }
.form-error { color: var(--danger); font-weight: 570; }
.report-filter { display: flex; align-items: center; gap: 8px; margin-left: auto; color: var(--muted); font-size: .89rem; }
.report-filter select { width: auto; max-width: 100%; }
.person-row .button { font-size: .88rem; }

.gate {
  display: grid; align-content: start; gap: clamp(35px, 10vh, 105px); min-height: 100dvh; color: var(--ink);
  max-width: 1050px; margin: 0 auto; padding: 35px clamp(20px, 5vw, 52px);
}
.gate .logo-mark { background: var(--forest); color: var(--leaf); }
.gate .logo-words span { color: var(--action); border-color: #c6d6c6; }
.gate-layout {
  display: grid; grid-template-columns: minmax(200px, .85fr) minmax(0, 1.15fr);
  border-radius: 18px; overflow: hidden; background: white; border: 1px solid var(--line);
}
.gate-graphic { display: grid; place-items: center; min-height: 310px; background: var(--leaf); }
.gate-graphic .deck-art { transform: scale(1.28); }
.gate-content { padding: clamp(24px, 5vw, 54px); display: grid; align-content: center; gap: 15px; }
.gate-content p { max-width: 44ch; color: var(--muted); }
.gate-content .form-error { color: var(--danger); }
.gate-actions { display: flex; gap: 9px; flex-wrap: wrap; }
#google-button { min-height: 44px; }
.fallback { max-width: 620px; padding: 50px 20px; margin: 0 auto; display: grid; gap: 17px; }

@media (max-width: 1060px) {
  .task-layout { grid-template-columns: minmax(0, 1fr); }
  .overview { max-width: 510px; }
}

@media (max-width: 730px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; min-height: auto; padding: 11px 14px 6px; gap: 9px; display: grid; grid-template-columns: 1fr minmax(0, 52%); }
  .sidebar .brand { margin: 0; }
  .sidebar nav { display: flex; flex-wrap: wrap; gap: 4px; grid-column: 1 / -1; grid-row: 2; }
  .sidebar nav a { min-height: 44px; padding: 0 9px; gap: 5px; font-size: .83rem; }
  .sidebar nav svg { width: 17px; height: 17px; }
  .sidebar nav a[aria-current] { box-shadow: inset 0 -2px var(--leaf); }
  .sidebar-bottom { grid-column: 2; grid-row: 1; margin: 0; }
  .account { padding: 0; border: 0; justify-content: flex-end; }
  .account > div { flex: 0 1 auto; }
  .account .avatar { display: none; }
  .main-content { padding: 16px 14px 34px; }
  .topline { padding-bottom: 9px; }
  .page-heading { margin-top: 17px; flex-wrap: wrap; gap: 11px; }
  .gate { gap: 26px; }
  .gate-layout { grid-template-columns: minmax(0, 1fr); }
  .gate-graphic { min-height: 154px; }
  .gate-graphic .deck-art { height: 155px; transform: scale(.8); }
  .gate-graphic .deck-card { top: 14px; }
}

@media (max-width: 480px) {
  .next-task { grid-template-columns: minmax(0, 1fr) 75px; }
  .next-copy { padding: 18px 0 19px 15px; }
  .next-copy h2 { font-size: 1.66rem; }
  .next-task .deck-art { transform: scale(.58); transform-origin: 27% 50%; left: 9px; }
  .item-row { padding: 10px 11px; gap: 8px; }
  .item-row .item-icon { width: 32px; height: 32px; }
  .item-row .item-icon svg { width: 17px; height: 17px; }
  .item-row .chevron { display: none; }
  .item-row .badge { max-width: 86px; }
  .person-row { flex-wrap: wrap; }
  .person-row .item-copy { flex-basis: calc(100% - 43px); }
  .person-row .button { margin-left: auto; }
  .field-pair { grid-template-columns: 1fr; }
  .panel-header, .filters { padding-left: 12px; padding-right: 12px; }
}
