:root {
  color-scheme: dark;
  --bg: #071014;
  --panel: #0d191d;
  --panel-2: #122126;
  --panel-3: #172a30;
  --line: #294047;
  --line-soft: #1c3036;
  --text: #f1eee5;
  --muted: #a6b3b2;
  --gold: #d6ad5c;
  --gold-bright: #f0cf83;
  --teal: #4db7aa;
  --green: #7bc58a;
  --orange: #e6a45f;
  --red: #d77b6f;
  --shadow: 0 22px 70px rgba(0,0,0,.3);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: radial-gradient(circle at 70% -10%, #15323a 0, transparent 34rem), var(--bg); color: var(--text); }
button, select, input { font: inherit; }
button, select { color: inherit; }
button { cursor: pointer; }

.site-header {
  min-height: 72px;
  padding: 12px clamp(18px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(214,173,92,.18);
  background: rgba(7,16,20,.88);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid #876d38; background: linear-gradient(145deg,#2b3b35,#121d20); color: var(--gold-bright); font-family: Georgia,serif; font-size: 23px; box-shadow: inset 0 0 16px rgba(214,173,92,.12); }
.brand strong, .brand small { display: block; }
.brand strong { font-family: Georgia, serif; letter-spacing: .04em; }
.brand small { color: var(--muted); margin-top: 2px; font-size: 12px; }
.header-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.quiet-button, .text-button, .primary-button { border: 0; }
.quiet-button { background: #132329; border: 1px solid var(--line); padding: 9px 12px; border-radius: 7px; }
.quiet-button:hover, .quiet-button:focus-visible { border-color: var(--gold); }
.text-button { background: transparent; color: var(--gold-bright); padding: 6px; }
.primary-button { background: var(--gold); color: #15120b; font-weight: 800; padding: 11px 16px; border-radius: 7px; }

main { width: min(1540px, 100%); margin: 0 auto; padding: 0 clamp(16px, 3vw, 44px) 72px; }
.hero { min-height: 340px; display: grid; grid-template-columns: minmax(0,1.4fr) minmax(280px,.6fr); gap: clamp(28px,6vw,90px); align-items: center; padding: 54px 0 42px; }
.eyebrow { margin: 0 0 8px; color: var(--gold-bright); text-transform: uppercase; letter-spacing: .14em; font-size: 11px; font-weight: 800; }
h1,h2,h3,p { margin-top: 0; }
h1 { max-width: 880px; margin-bottom: 20px; font-family: Georgia,serif; font-size: clamp(42px,6vw,76px); line-height: .98; font-weight: 500; letter-spacing: -.035em; }
h1 span { color: var(--gold-bright); }
h2 { font-family: Georgia,serif; font-weight: 500; letter-spacing: -.015em; }
.hero-copy { max-width: 750px; color: #c4cecc; font-size: clamp(17px,2vw,21px); line-height: 1.55; }
.hero-proof { display: grid; grid-template-columns: 38px 1fr; gap: 17px 14px; padding: 24px; border: 1px solid rgba(214,173,92,.25); background: linear-gradient(160deg,rgba(23,42,48,.9),rgba(10,20,24,.92)); box-shadow: var(--shadow); }
.hero-proof > span { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #806b40; color: var(--gold-bright); border-radius: 50%; font-weight: 800; }
.hero-proof p { margin: 4px 0 0; color: var(--muted); line-height: 1.45; }
.hero-proof strong { color: var(--text); }

.planner-shell { display: grid; grid-template-columns: 330px minmax(0,1fr); border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow); min-height: 720px; }
.filters { padding: 26px 22px; border-right: 1px solid var(--line); background: linear-gradient(180deg,#101f24,#0a1519); }
.filter-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 26px; }
.filter-heading h2 { margin-bottom: 0; font-size: 28px; }
fieldset { margin: 0 0 28px; padding: 0; border: 0; }
legend { font-weight: 800; margin-bottom: 5px; }
.field-help { color: var(--muted); font-size: 13px; line-height: 1.45; margin-bottom: 14px; }
.choice-grid { display: grid; gap: 7px; }
.choice-card { position: relative; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line-soft); background: #0d1a1e; border-radius: 7px; transition: border-color .15s, background .15s; }
.choice-card:hover { border-color: #49616a; }
.choice-card:has(input:checked) { border-color: #88713d; background: rgba(214,173,92,.1); }
.choice-card input { position: absolute; opacity: 0; }
.choice-icon { width: 30px; height: 30px; object-fit: contain; flex: 0 0 auto; }
.choice-fallback { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #20363d; color: var(--gold-bright); font-weight: 800; font-size: 11px; }
.choice-copy { min-width: 0; }
.choice-copy strong { display: block; font-size: 13px; }
.choice-copy small { display: block; margin-top: 2px; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.region-grid { grid-template-columns: 1fr 1fr; }
.region-grid .choice-card { min-height: 38px; padding: 7px 9px; }
.region-grid .choice-copy strong { font-size: 12px; }
.filter-note { padding: 14px; background: #14262b; border-left: 3px solid var(--teal); color: var(--muted); font-size: 13px; line-height: 1.45; }
.filter-note strong, .filter-note span { display: block; }
.filter-note strong { color: var(--text); margin-bottom: 4px; }
.optional-route { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 18px; padding: 13px; border: 1px solid var(--line); background: #0d1a1e; border-radius: 7px; }
.optional-route:has(input:checked) { border-color: #88713d; background: rgba(214,173,92,.1); }
.optional-route input { margin-top: 3px; accent-color: var(--gold); }
.optional-route strong, .optional-route small { display: block; }
.optional-route strong { font-size: 13px; }
.optional-route small { margin-top: 3px; color: var(--muted); line-height: 1.4; }

.results { min-width: 0; }
.results-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 20px 24px; border-bottom: 1px solid var(--line); background: #101e23; position: sticky; top: 72px; z-index: 10; }
.progress-block { min-width: min(360px,50%); }
.progress-numbers strong { font-size: 28px; color: var(--gold-bright); }
.progress-numbers span { color: var(--muted); }
.progress-track { height: 5px; background: #263a40; margin: 8px 0; overflow: hidden; }
.progress-track span { display: block; width: 0; height: 100%; background: linear-gradient(90deg,var(--gold),var(--teal)); transition: width .2s; }
.progress-block small { color: var(--muted); }
.toolbar-controls { display: flex; align-items: end; justify-content: flex-end; gap: 16px; flex-wrap: wrap; }
.toolbar-controls label > span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 5px; }
select { min-height: 39px; padding: 0 34px 0 10px; border: 1px solid var(--line); border-radius: 6px; background: #0d191d; }
.switch-control { display: flex!important; align-items: center; gap: 8px; min-height: 39px; color: var(--muted); }
.switch-control span { margin: 0!important; }
.switch-control input { accent-color: var(--gold); }
.results-summary { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 28px 24px 16px; }
.results-summary h2 { font-size: 30px; margin-bottom: 0; }
.results-summary > p { max-width: 470px; margin-bottom: 4px; color: var(--muted); text-align: right; line-height: 1.45; }
.combat-ideas { margin: 8px 24px 6px; padding: 18px; border: 1px solid #574a2c; background: linear-gradient(135deg, rgba(214,173,92,.09), rgba(18,33,38,.8)); }
.combat-ideas h3 { margin: 4px 0 15px; font-family: Georgia, serif; font-size: 24px; font-weight: 500; }
.combat-idea-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px 18px; }
.combat-idea-grid p { margin: 0; padding-top: 9px; border-top: 1px solid rgba(126,107,65,.45); }
.combat-idea-grid strong, .combat-idea-grid span { display: block; }
.combat-idea-grid strong { color: var(--gold-bright); font-size: 13px; }
.combat-idea-grid span { margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.task-list { padding: 4px 24px 30px; }
.task-group { margin: 16px 0 32px; }
.task-group-heading { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.task-group-heading img { width: 38px; height: 38px; object-fit: contain; }
.task-group-heading h2 { margin: 0; font-size: 24px; }
.task-group-heading span { margin-left: auto; color: var(--muted); font-size: 13px; }
.task-row { display: grid; grid-template-columns: 36px minmax(0,1fr) auto; gap: 12px; align-items: center; min-height: 92px; padding: 15px 10px; border-bottom: 1px solid var(--line-soft); }
.task-row:hover { background: rgba(255,255,255,.018); }
.task-row.is-complete { opacity: .58; }
.task-row.is-complete h3 { text-decoration: line-through; }
.task-check { align-self: start; padding-top: 3px; }
.task-check input { position: absolute; opacity: 0; }
.task-check span { width: 22px; height: 22px; display: block; border: 1px solid #53676c; background: #0a1417; border-radius: 4px; }
.task-check input:checked + span { border-color: var(--gold); background: var(--gold); box-shadow: inset 0 0 0 5px #182126; }
.task-check input:focus-visible + span { outline: 2px solid var(--gold-bright); outline-offset: 3px; }
.task-title-line { display: flex; align-items: start; gap: 12px; }
.task-title-line h3 { margin: 0; font-size: 16px; line-height: 1.35; font-weight: 720; }
.points-badge { flex: 0 0 auto; padding: 3px 7px; color: #17130a; background: var(--gold-bright); border-radius: 999px; font-size: 11px; font-weight: 900; }
.task-note { margin: 5px 0 8px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.task-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.task-tags span { padding: 3px 7px; border: 1px solid #294148; color: #b9c7c5; border-radius: 999px; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
.task-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; padding-left: 12px; }
.afk-badge { padding: 4px 8px; border-radius: 4px; font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.afk-full { background: rgba(123,197,138,.15); color: #9de5aa; }
.afk-mostly { background: rgba(77,183,170,.14); color: #75d5c9; }
.afk-low { background: rgba(230,164,95,.14); color: #f0b978; }
.afk-conditional { background: rgba(215,123,111,.14); color: #ef9b8f; }
.task-tier { color: var(--muted); font-size: 11px; }
.empty-state { padding: 72px 20px; text-align: center; color: var(--muted); }
.empty-state strong { display: block; color: var(--text); font-family: Georgia,serif; font-size: 27px; margin-bottom: 8px; }

.method-note { margin: 42px 0 0; padding: 34px; border: 1px solid var(--line); background: #0c171b; }
.method-note h2 { max-width: 780px; font-size: clamp(26px,4vw,42px); }
.method-columns { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-top: 28px; }
.method-columns p { margin: 0; padding-top: 14px; border-top: 2px solid var(--line); }
.method-columns strong, .method-columns span { display: block; }
.method-columns strong { color: var(--gold-bright); margin-bottom: 7px; }
.method-columns span { color: var(--muted); line-height: 1.45; }

dialog { width: min(600px,calc(100% - 24px)); padding: 0; border: 1px solid #53636a; background: #0e1a1f; color: var(--text); box-shadow: 0 35px 110px #000; }
dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(3px); }
.dialog-card { padding: 24px; }
.dialog-card header { display: flex; justify-content: space-between; gap: 18px; }
.dialog-card h2 { margin-bottom: 12px; }
.dialog-close { width: 34px; height: 34px; border: 1px solid var(--line); background: #14252a; color: var(--text); font-size: 22px; }
.dialog-card li, .privacy-note { color: var(--muted); line-height: 1.55; }
.dialog-card input[type=file] { width: 100%; padding: 12px; border: 1px dashed #52676e; background: #0a1417; }
#import-status { min-height: 22px; margin: 12px 0; color: var(--gold-bright); }
.dialog-card footer { display: flex; justify-content: flex-end; }

@media (max-width: 1000px) {
  .planner-shell { grid-template-columns: 280px minmax(0,1fr); }
  .results-toolbar { align-items: flex-start; }
  .toolbar-controls { max-width: 270px; }
  .results-summary { align-items: flex-start; flex-direction: column; }
  .results-summary > p { text-align: left; }
}

@media (max-width: 760px) {
  .site-header { position: static; align-items: flex-start; }
  .header-actions { display: none; }
  main { padding-inline: 12px; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 38px; }
  h1 { font-size: 46px; }
  .planner-shell { display: block; }
  .filters { border-right: 0; border-bottom: 1px solid var(--line); }
  .relic-grid { grid-template-columns: 1fr 1fr; }
  .results-toolbar { position: static; flex-direction: column; }
  .progress-block { min-width: 100%; }
  .toolbar-controls { max-width: none; width: 100%; justify-content: flex-start; }
  .results-summary, .task-list { padding-inline: 14px; }
  .combat-ideas { margin-inline: 14px; }
  .combat-idea-grid { grid-template-columns: 1fr; }
  .task-row { grid-template-columns: 32px minmax(0,1fr); }
  .task-meta { grid-column: 2; flex-direction: row; align-items: center; padding-left: 0; }
  .method-columns { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .relic-grid, .region-grid { grid-template-columns: 1fr; }
  h1 { font-size: 39px; }
  .hero-proof { padding: 18px; }
  .filters { padding-inline: 16px; }
  .task-title-line { display: block; }
  .points-badge { display: inline-block; margin-top: 7px; }
}
