:root {
  color-scheme: light;
  --ink: #263735;
  --muted: #647370;
  --accent: #3b7169;
  --accent-dark: #2c5c55;
  --accent-soft: #e7f1ee;
  --future: #856b3e;
  --future-soft: #f4efe5;
  --paper: #f2f4f1;
  --surface: #fbfcfa;
  --surface-soft: #f6f8f5;
  --line: #d8dfdb;
  --line-strong: #c7d1cc;
  --shadow: 0 5px 18px rgb(43 69 64 / 5%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.6 "Avenir Next", "Trebuchet MS", sans-serif; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgb(59 113 105 / 20%); outline-offset: 2px; }

.hero { padding: 34px 24px 30px; border-bottom: 1px solid var(--line); color: var(--ink); background: radial-gradient(circle at 88% 15%, rgb(206 226 220 / 60%), transparent 30%), linear-gradient(135deg, #eef4f1, #f5f5ef); }
.hero__inner { display: flex; max-width: 1320px; margin: auto; align-items: center; justify-content: space-between; gap: 32px; }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: .72rem; font-weight: 750; letter-spacing: .12em; }
h1 { margin: 0; font: 600 clamp(2rem, 4vw, 3.25rem)/1.08 Georgia, serif; letter-spacing: -.025em; }
.hero__description { max-width: 620px; margin: 10px 0 0; color: var(--muted); font-size: 1rem; }
.legend { display: flex; flex-wrap: wrap; justify-content: end; gap: 10px; }
.legend span { display: flex; align-items: center; gap: 8px; padding: 8px 11px; border: 1px solid var(--line-strong); border-radius: 999px; background: rgb(255 255 255 / 56%); color: #50615e; font-size: .78rem; font-weight: 650; }
.legend b, .legend__implemented strong { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 7px; background: #fff; color: var(--accent-dark); box-shadow: 0 0 0 1px var(--line); }
.legend__implemented { border-color: #a7c8bf !important; background: #e4f2ed !important; color: #245f53 !important; }
.legend i { width: 9px; height: 9px; border-radius: 50%; background: #9caaa6; }

main { width: min(1320px, calc(100% - 40px)); margin: 22px auto 70px; }
.area-selector { display: grid; grid-template-columns: minmax(190px, .32fr) 1fr; gap: 20px; align-items: center; margin-bottom: 16px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.area-selector > div span, .area-selector > div strong { display: block; }
.area-selector > div span { margin-bottom: 3px; color: var(--accent); font-size: .69rem; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.area-selector > div strong { font-size: .94rem; font-weight: 650; }
.area-tabs { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.area-tab { display: inline-flex; min-height: 36px; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface-soft); color: #53635f; font-size: .76rem; font-weight: 650; white-space: nowrap; }
.area-tab b { display: grid; min-width: 23px; height: 23px; padding: 0 5px; place-items: center; border-radius: 999px; background: #e7ece9; color: #687773; font-size: .68rem; }
.area-tab:hover { border-color: #9fb4ae; background: #f9fbf9; }
.area-tab.is-selected { border-color: #9cbdb5; background: var(--accent-soft); color: var(--accent-dark); }
.area-tab.is-selected b { background: #5c8981; color: #fff; }
.summary { display: grid; grid-template-columns: repeat(4, 1fr) 1.35fr; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.summary article { min-height: 110px; padding: 19px 22px; border-right: 1px solid var(--line); }
.summary article:last-child { border: 0; }
.summary span, .summary small { display: block; color: var(--muted); }
.summary span { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .065em; }
.summary strong { display: block; margin: 4px 0; font: 600 2rem/1.1 Georgia, serif; }
.summary small { font-size: .78rem; }
.summary__progress div { height: 8px; margin-top: 13px; overflow: hidden; border-radius: 999px; background: #e3e7e1; }
.summary__progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: #79a9a0; transition: width .25s ease; }

.toolbar { position: sticky; z-index: 10; top: 0; display: grid; grid-template-columns: minmax(240px, 1.5fr) repeat(2, minmax(160px, .7fr)) auto auto; gap: 12px; margin: 20px 0 12px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: rgb(242 244 241 / 96%); box-shadow: 0 4px 15px rgb(43 69 64 / 5%); backdrop-filter: blur(12px); }
label span { display: block; margin: 0 0 5px 3px; color: var(--muted); font-size: .69rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
input, select { width: 100%; height: 44px; border: 1px solid var(--line-strong); border-radius: 10px; outline: 0; background: var(--surface); color: var(--ink); padding: 0 13px; }
input:focus, select:focus { border-color: #8aaca5; box-shadow: 0 0 0 3px rgb(59 113 105 / 10%); }
.button { align-self: end; min-height: 44px; padding: 0 15px; border: 0; border-radius: 10px; font-weight: 700; }
.button--secondary { color: #fff; background: var(--accent-dark); }
.button--secondary:hover { background: #244e49; }
.button--quiet { border: 1px solid var(--line-strong); background: var(--surface); color: #435451; }
.list-meta { display: flex; min-height: 34px; align-items: center; justify-content: space-between; color: var(--muted); font-size: .8rem; }
#save-status { min-width: 210px; text-align: right; }

.roadmap { display: grid; gap: 11px; }
.roadmap-item { display: grid; grid-template-columns: 60px 1fr 300px; min-height: 116px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 2px 9px rgb(43 69 64 / 3%); transition: border-color .18s ease, background .18s ease; }
.roadmap-item:hover { border-color: #bdc9c4; background: #fdfefc; }
.roadmap-item[data-decision="1"] { border-left: 4px solid #6e9f96; }
.roadmap-item[data-decision="2"] { border-left: 4px solid #b39b70; }
.roadmap-item[data-implemented="true"] { border-left: 4px solid #4a8d7d; background: #f8fcfa; }
.roadmap-item__number { display: grid; place-items: center; border-right: 1px solid var(--line); color: #758481; font: 700 .78rem/1 monospace; background: var(--surface-soft); }
.roadmap-item__content { align-self: center; padding: 18px 24px; }
.roadmap-item__category { color: var(--accent); font-size: .68rem; font-weight: 750; text-transform: uppercase; letter-spacing: .075em; }
.roadmap-item h2 { margin: 4px 0 6px; font-size: 1.04rem; font-weight: 650; line-height: 1.32; }
.roadmap-item p { max-width: 850px; margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.55; }
.roadmap-item__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-content: center; padding: 16px; border-left: 1px solid var(--line); background: var(--surface-soft); }
.implemented-badge { grid-column: 1 / -1; display: inline-flex; min-height: 50px; align-items: center; justify-content: center; gap: 9px; border: 1px solid #a7c8bf; border-radius: 11px; background: #e4f2ed; color: #245f53; font-size: .8rem; font-weight: 750; }
.implemented-badge[hidden] { display: none; }
.implemented-badge strong { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 999px; background: #4a8d7d; color: #fff; }
.decision { display: flex; min-height: 50px; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-strong); border-radius: 11px; background: #fff; color: #40514e; font-size: .78rem; font-weight: 700; }
.decision b { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 7px; background: #edf1ee; }
.decision:hover { border-color: #96ada7; background: #fcfdfc; }
.decision--one.is-selected { border-color: #a9c8c1; background: var(--accent-soft); color: #2c625a; box-shadow: none; }
.decision--one.is-selected b { background: #53867d; color: #fff; }
.decision--two.is-selected { border-color: #d5c5a6; background: var(--future-soft); color: #715b35; box-shadow: none; }
.decision--two.is-selected b { background: #94784a; color: #fff; }
.clear { grid-column: 1 / -1; min-height: 24px; border: 0; background: transparent; color: #7c8d89; font-size: .72rem; text-decoration: underline; }
.empty { padding: 50px; border: 1px dashed #b8c6c0; border-radius: 16px; text-align: center; }
.empty strong, .empty span { display: block; }
.empty span { color: var(--muted); }

@media (max-width: 980px) {
  .hero__inner { display: block; }
  .legend { justify-content: start; margin-top: 24px; }
  .area-selector { grid-template-columns: 1fr; }
  .area-tabs { justify-content: flex-start; }
  .summary { grid-template-columns: 1fr 1fr; }
  .summary article { border-bottom: 1px solid var(--line); }
  .summary article:nth-child(even) { border-right: 0; }
  .summary article:last-child { grid-column: 1 / -1; border-bottom: 0; }
  .toolbar { grid-template-columns: 1fr 1fr; }
  .search { grid-column: 1 / -1; }
  .roadmap-item { grid-template-columns: 54px 1fr; }
  .roadmap-item__actions { grid-column: 1 / -1; border-top: 1px solid var(--line); border-left: 0; }
}

@media (max-width: 620px) {
  body { font-size: 15px; }
  .hero { padding: 28px 18px 24px; }
  .legend span { padding: 7px 9px; }
  main { width: min(100% - 20px, 1320px); margin-top: 14px; }
  .area-selector { gap: 12px; padding: 14px 12px; }
  .area-tabs { flex-wrap: nowrap; overflow-x: auto; padding: 2px 1px 7px; scrollbar-width: thin; }
  .area-tab { flex: 0 0 auto; }
  .summary { grid-template-columns: 1fr 1fr; }
  .summary article { min-height: 100px; padding: 15px; }
  .summary strong { font-size: 1.7rem; }
  .toolbar { position: static; grid-template-columns: 1fr; padding: 11px; }
  .search { grid-column: auto; }
  .toolbar label, .toolbar .button { display: block; width: 100%; }
  .roadmap-item { grid-template-columns: 46px 1fr; }
  .roadmap-item__content { padding: 16px 14px; }
  .roadmap-item__actions { padding: 10px; }
  .decision { min-height: 50px; }
  #save-status { min-width: 0; }
}

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