:root {
  color-scheme: light;
  --paper: #f7f4ea;
  --ink: #1f2a2b;
  --muted: #687677;
  --line: #d7d1c2;
  --panel: #fffdf6;
  --panel-2: #eef6f2;
  --accent: #0b6f6f;
  --accent-2: #cc5d32;
  --accent-3: #e0ab2f;
  --good: #348f64;
  --warn: #c98023;
  --bad: #b94a4a;
  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;
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(11,111,111,.08), transparent 38%),
    linear-gradient(230deg, rgba(204,93,50,.09), transparent 34%),
    var(--paper);
}
a { color: inherit; }
button, input, select { font: inherit; }
button { cursor: pointer; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(14px, 3vw, 34px);
  border-bottom: 1px solid rgba(31,42,43,.12);
  background: rgba(247,244,234,.92);
  backdrop-filter: blur(16px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--ink);
  color: #fffdf6;
  letter-spacing: 0;
  font-size: 13px;
}
.nav { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.nav a { text-decoration: none; font-size: 14px; color: var(--muted); font-weight: 700; }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 7px 10px;
  font-weight: 900;
}
.lang button.active { background: var(--ink); color: white; }

main { width: min(1220px, calc(100% - 26px)); margin: 0 auto; }
.hero {
  min-height: clamp(420px, 72vh, 620px);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, .85fr);
  gap: 28px;
  align-items: center;
  padding: clamp(30px, 5vw, 74px) 0 22px;
}
.hero-copy { max-width: 720px; }
.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
  font-weight: 900;
  font-size: 12px;
}
h1, h2, p { margin-top: 0; }
h1 {
  margin-bottom: 18px;
  font-size: clamp(42px, 7vw, 84px);
  line-height: .95;
  letter-spacing: 0;
}
.hero p:not(.eyebrow) {
  max-width: 650px;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.5;
  color: #435052;
}
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.primary, .secondary, .small {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 14px;
  font-weight: 900;
}
.primary { background: var(--accent); border-color: var(--accent); color: white; }
.secondary, .small { background: var(--panel); color: var(--ink); }
.small { padding: 8px 10px; }
.sun-card {
  min-height: 330px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #d8efe9 0 48%, #f9e2b4 48% 100%);
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(31,42,43,.13);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 24px;
}
.sun-card:before {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: 62px;
  height: 72px;
  background: repeating-linear-gradient(90deg, #f8f1df 0 38px, #e7d4af 38px 44px);
  border: 1px solid rgba(31,42,43,.18);
}
.sun-orbit {
  position: absolute;
  inset: 38px 30px 90px;
  border-top: 2px dashed rgba(31,42,43,.25);
  border-radius: 50% 50% 0 0;
}
.sun-orbit span {
  position: absolute;
  top: -20px;
  left: 56%;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent-3);
  box-shadow: 0 0 0 12px rgba(224,171,47,.18);
}
.sun-card strong { position: relative; font-size: 58px; line-height: 1; }
.sun-card span:not(.sun-orbit span) { position: relative; display: block; color: var(--muted); font-weight: 800; }

.planner {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.panel, .workspace, .brief-card, .doc-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,253,246,.9);
  box-shadow: 0 14px 48px rgba(31,42,43,.08);
}
.setup { padding: 16px; position: sticky; top: 78px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-head h2 { margin-bottom: 0; font-size: 20px; }
.field, .range-grid label {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 800;
}
select, input[type="number"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 10px;
}
input[type="range"] { width: 100%; accent-color: var(--accent); }
.range-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 10px;
}
.range-grid b { color: var(--ink); font-size: 13px; }
.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 16px;
}
.tool {
  min-height: 66px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  text-align: left;
  padding: 8px;
}
.tool.active { outline: 3px solid rgba(11,111,111,.18); border-color: var(--accent); }
.tool span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #ebf2ed;
  color: var(--accent);
  font-weight: 900;
}
.tool b { font-size: 12px; overflow-wrap: anywhere; }
.budget-row, .meters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 15px;
}
.budget-row div, .meters div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--panel-2);
}
.budget-row span, .meters span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; }
.budget-row strong, .meters strong { font-size: 24px; }

.workspace { overflow: hidden; }
.tabs {
  display: flex;
  gap: 4px;
  padding: 8px;
  border-bottom: 1px solid var(--line);
  background: #f1ead8;
}
.tab {
  border: 0;
  border-radius: 8px;
  padding: 10px 13px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}
.tab.active { background: var(--ink); color: white; }
.view { display: none; padding: 14px; }
.view.active { display: block; }
.meters { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 12px; }
canvas {
  width: 100%;
  aspect-ratio: 960 / 620;
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf0;
}
.hint { margin: 10px 2px 0; color: var(--muted); font-weight: 700; }
.timeline-head { max-width: 720px; }
.timeline-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.time-card, .risk-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 14px;
}
.time-card strong { display: block; font-size: 24px; }
.time-card meter { width: 100%; height: 12px; }
.risk-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
ol { padding-left: 22px; }
li { margin-bottom: 10px; line-height: 1.45; }
.brief {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 18px;
  align-items: start;
  padding: 54px 0;
}
.brief h2 { font-size: clamp(28px, 4vw, 44px); margin-bottom: 10px; }
.brief-card { padding: 16px; }
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  min-height: 220px;
  margin: 0 0 14px;
  color: #243031;
  font-size: 14px;
  line-height: 1.5;
}
footer { padding: 22px; text-align: center; color: var(--muted); font-weight: 700; }
.doc { background: var(--paper); }
.doc-shell { width: min(820px, calc(100% - 28px)); margin: 34px auto; padding: 24px; }
.doc-shell a { font-weight: 900; color: var(--accent); }
.doc-shell h1 { font-size: 40px; }
.doc-shell section { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 18px; }

@media (max-width: 900px) {
  .hero, .planner, .brief, .risk-grid { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding-top: 34px; }
  .setup { position: static; }
  .timeline-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .nav { justify-content: flex-start; }
  h1 { font-size: 40px; }
  .sun-card { min-height: 230px; }
  .range-grid, .tool-grid, .budget-row, .meters, .timeline-list { grid-template-columns: 1fr; }
  .primary, .secondary { width: 100%; }
  .tabs { overflow-x: auto; }
}
