:root {
  --ink: #17231f;
  --muted: #6b7973;
  --surface: #fff;
  --line: #dfe8e3;
  --green: #25a66a;
  --yellow: #e0a92d;
  --red: #d95454;
  --accent: #145c46;
}
* { box-sizing: border-box; }
body {
  margin: 0; color: var(--ink); background: #f3f7f5;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
}
.site-header {
  min-height: 68px; padding: 0 max(24px, calc((100% - 1180px) / 2));
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.brand { color: var(--accent); font-size: 1.35rem; font-weight: 800; text-decoration: none; }
nav { display: flex; gap: 22px; }
nav a { color: var(--muted); text-decoration: none; font-size: .92rem; }
nav a:hover { color: var(--accent); }
.nav-login { padding: 8px 14px; color: white; background: var(--accent); border-radius: 999px; }
.nav-login:hover { color: white; background: #0d4937; }
.admin-link { color: var(--accent); font-weight: 800; }
main { max-width: 1180px; margin: 0 auto; padding: 40px 24px 64px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.04em; }
.eyebrow { margin-bottom: 8px; color: var(--green); font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.muted, .empty { color: var(--muted); }
.page-heading { margin-bottom: 28px; display: flex; align-items: center; justify-content: space-between; }
.badge { padding: 7px 11px; color: var(--accent); background: #dff3e9; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.hero-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 16px; }
.signal-card, .metric-card, .panel, .login-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 8px 30px rgb(26 60 47 / 5%);
}
.signal-card, .metric-card { min-height: 190px; padding: 24px; }
.signal-card { position: relative; }
.signal-card p, .metric-card p { color: var(--muted); font-size: .86rem; }
.signal-card h2 { margin: 24px 0 4px; font-size: 1.15rem; }
.signal-card strong { font-size: 3.5rem; letter-spacing: -.06em; }
.signal-card span { color: var(--muted); }
.signal-dot { position: absolute; top: 26px; right: 26px; width: 16px; height: 16px; border-radius: 50%; background: #a8b3ae; box-shadow: 0 0 0 7px #edf1ef; }
.signal-card.green .signal-dot, .status-pill.green { background: var(--green); }
.signal-card.yellow .signal-dot, .status-pill.yellow { background: var(--yellow); }
.signal-card.red .signal-dot, .status-pill.red { background: var(--red); }
.metric-card { display: flex; flex-direction: column; justify-content: space-between; }
.metric-card h2 { margin: 0; font-size: 2rem; }
.metric-card h2.compact { font-size: 1rem; line-height: 1.5; overflow-wrap: anywhere; }
small { color: var(--muted); font-size: .8rem; font-weight: 500; }
.section-grid { margin-top: 28px; display: grid; grid-template-columns: .8fr 1.4fr; gap: 18px; align-items: start; }
.panel { padding: 24px; }
.panel-title { display: flex; align-items: center; justify-content: space-between; }
.panel-title h2 { font-size: 1.2rem; }
.panel-title a { color: var(--accent); font-size: .85rem; }
.daily-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.daily-stats div { padding: 16px; background: #f5f8f6; border-radius: 12px; }
.daily-stats strong, .daily-stats span { display: block; }
.daily-stats strong { font-size: 1.7rem; }
.daily-stats span { margin-top: 5px; color: var(--muted); font-size: .76rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .87rem; }
th, td { padding: 13px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-size: .72rem; text-transform: uppercase; }
.status-pill { display: inline-block; min-width: 60px; padding: 5px 8px; color: white; border-radius: 999px; text-align: center; font-size: .7rem; font-weight: 800; }
.login-card { max-width: 430px; margin: 8vh auto; padding: 34px; }
.auth-switch { margin: 22px 0 0; color: var(--muted); text-align: center; font-size: .9rem; }
.auth-switch a { color: var(--accent); font-weight: 800; }
.setup-card { position: relative; }
.setup-step {
  position: absolute; top: 20px; right: 22px; padding: 6px 9px;
  color: var(--accent); background: #dff3e9; border-radius: 999px;
  font-size: .72rem; font-weight: 800;
}
.ring-help { margin: 18px 0 0; color: var(--muted); text-align: center; font-size: .78rem; }
label { display: block; margin: 18px 0; font-size: .85rem; font-weight: 700; }
input { width: 100%; margin-top: 7px; padding: 13px; border: 1px solid #cbd7d1; border-radius: 9px; font: inherit; }
input:focus { outline: 2px solid #a9d8c3; border-color: var(--green); }
button { width: 100%; padding: 14px; color: white; background: var(--accent); border: 0; border-radius: 9px; font: inherit; font-weight: 800; cursor: pointer; }
textarea { width: 100%; margin-top: 7px; padding: 13px; resize: vertical; border: 1px solid #cbd7d1; border-radius: 9px; font: inherit; line-height: 1.55; }
textarea:focus { outline: 2px solid #a9d8c3; border-color: var(--green); }
select { width: 100%; margin-top: 7px; padding: 13px; border: 1px solid #cbd7d1; border-radius: 9px; background: white; font: inherit; }
.alert { margin-top: 18px; padding: 12px; color: #8e2929; background: #ffebeb; border-radius: 8px; }
.profile-list div { padding: 17px 0; display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); }
.profile-list span, .disclaimer { color: var(--muted); }
.disclaimer { max-width: 620px; margin: 20px 4px; font-size: .85rem; }
.public-hero {
  min-height: 590px; display: grid; grid-template-columns: 1.15fr .85fr;
  gap: clamp(40px, 8vw, 100px); align-items: center;
}
.public-hero h1 { max-width: 760px; font-size: clamp(2.8rem, 6vw, 5.3rem); line-height: .98; }
.hero-intro { max-width: 660px; margin: 28px 0; color: var(--muted); font-size: 1.12rem; line-height: 1.7; }
.hero-actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.button-link {
  display: inline-block; padding: 14px 20px; color: white; background: var(--accent);
  border-radius: 10px; text-decoration: none; font-weight: 800;
}
.button-link:hover { background: #0d4937; }
.text-link { color: var(--accent); font-weight: 750; text-decoration: none; }
.ring-visual { display: flex; flex-direction: column; align-items: center; }
.ring-orbit {
  width: min(340px, 75vw); aspect-ratio: 1; padding: 45px; display: grid; place-items: center;
  border: 1px solid #b9d8ca; border-radius: 50%;
  background: radial-gradient(circle, #fff 0 43%, #e5f2ec 44% 56%, transparent 57%);
  box-shadow: inset 0 0 0 24px rgb(255 255 255 / 45%), 0 30px 80px rgb(20 92 70 / 15%);
}
.ring-core {
  width: 150px; aspect-ratio: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; color: var(--accent); background: white; border-radius: 50%;
  box-shadow: 0 16px 50px rgb(20 92 70 / 14%);
}
.ring-core span { font-size: .85rem; letter-spacing: .16em; text-transform: uppercase; }
.ring-core strong { font-size: 2rem; }
.signal-key { margin-top: 26px; display: flex; gap: 15px; flex-wrap: wrap; justify-content: center; color: var(--muted); font-size: .75rem; }
.signal-key span { display: flex; align-items: center; gap: 6px; }
.signal-key i { width: 8px; height: 8px; border-radius: 50%; }
.green-dot { background: var(--green); }
.yellow-dot { background: var(--yellow); }
.red-dot { background: var(--red); }
.project-facts {
  margin: 24px 0 110px; display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
}
.project-facts div { min-height: 130px; padding: 28px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--line); }
.project-facts div:last-child { border-right: 0; }
.project-facts strong { color: var(--green); font-size: .8rem; }
.project-facts span { max-width: 220px; font-size: 1.05rem; font-weight: 750; }
.story-section, .about-builder { padding: 90px 0; display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(40px, 8vw, 120px); border-top: 1px solid var(--line); }
.section-heading h2, .about-builder h2, .public-cta h2 { font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.05; letter-spacing: -.04em; }
.story-copy p, .about-builder > div:last-child p { color: #40534b; font-size: 1.08rem; line-height: 1.8; }
.build-section { padding: 90px 0; border-top: 1px solid var(--line); }
.build-section .section-heading { max-width: 650px; margin-bottom: 44px; }
.build-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.build-grid article { min-height: 260px; padding: 26px; background: white; border: 1px solid var(--line); border-radius: 16px; }
.build-grid article > span { display: grid; place-items: center; width: 32px; height: 32px; color: var(--accent); background: #dff3e9; border-radius: 50%; font-size: .8rem; font-weight: 800; }
.build-grid h3 { margin: 48px 0 12px; font-size: 1.35rem; }
.build-grid p { color: var(--muted); line-height: 1.65; }
.edit-note { padding: 18px 20px; background: #e8f2ed; border-radius: 12px; font-size: .9rem !important; }
.public-cta {
  margin-top: 30px; padding: 54px; display: flex; align-items: center; justify-content: space-between; gap: 30px;
  color: white; background: var(--accent); border-radius: 22px;
}
.public-cta .eyebrow { color: #8fe0bb; }
.public-cta h2 { margin-bottom: 0; }
.public-cta .button-link { color: var(--accent); background: white; white-space: nowrap; }
.admin-heading { align-items: flex-end; }
.editor-form { max-width: 860px; }
.editor-panel {
  margin-bottom: 20px; padding: 28px; background: white; border: 1px solid var(--line);
  border-radius: 18px; box-shadow: 0 8px 30px rgb(26 60 47 / 5%);
}
.editor-panel h2 { margin-bottom: 22px; font-size: 1.25rem; }
.editor-panel label { margin: 16px 0; }
.editor-actions { position: sticky; bottom: 18px; margin-top: 24px; display: flex; justify-content: flex-end; }
.editor-actions button { width: auto; min-width: 190px; box-shadow: 0 10px 30px rgb(20 92 70 / 24%); }
.save-message { margin: 0 0 20px; padding: 14px 18px; color: var(--accent); background: #dff3e9; border-radius: 10px; font-weight: 750; }
.section-manager { max-width: 860px; margin-top: 90px; padding-top: 70px; border-top: 1px solid var(--line); }
.manager-heading { margin-bottom: 28px; }
.manager-heading h2, .add-section-panel > h2 { font-size: 2rem; }
.section-editor { scroll-margin-top: 25px; }
.section-editor-top { display: flex; align-items: center; justify-content: space-between; }
.section-order { display: flex; gap: 8px; }
.mini-button { width: auto; padding: 8px 11px; color: var(--accent); background: #e8f2ed; font-size: .78rem; }
.section-buttons { display: flex; gap: 10px; margin-top: 24px; }
.save-section { width: auto; min-width: 150px; }
.danger-button { width: auto; color: #a72e2e; background: #ffebeb; }
.current-image { padding: 14px; background: #f5f8f6; border-radius: 12px; }
.current-image img { width: 180px; max-height: 130px; object-fit: cover; border-radius: 8px; }
.checkbox-label { margin: 10px 0 0; display: flex; align-items: center; gap: 8px; font-weight: 600; }
.checkbox-label input { width: auto; margin: 0; }
.label-help { color: var(--muted); font-weight: 500; }
.empty-sections { margin-bottom: 20px; padding: 25px; color: var(--muted); background: white; border: 1px dashed #b8c9c1; border-radius: 14px; text-align: center; }
.add-section-panel { max-width: 860px; margin-top: 24px; scroll-margin-top: 25px; border: 2px solid #b8dccc; }
.custom-content { border-top: 1px solid var(--line); }
.custom-section { padding: 90px 0; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(35px, 8vw, 100px); border-bottom: 1px solid var(--line); }
.custom-section img { width: 100%; max-height: 520px; object-fit: cover; border-radius: 20px; box-shadow: 0 20px 60px rgb(26 60 47 / 12%); }
.custom-section h2 { font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.08; letter-spacing: -.04em; }
.custom-section p { color: #40534b; font-size: 1.05rem; line-height: 1.8; }
.custom-section.layout-right img { order: 2; }
.custom-section.layout-full { grid-template-columns: 1fr; }
.custom-section.layout-full img { max-height: 650px; }
.custom-section:not(:has(img)) { grid-template-columns: 1fr; }
@media (max-width: 850px) {
  .hero-grid { grid-template-columns: repeat(2, 1fr); }
  .section-grid { grid-template-columns: 1fr; }
  .public-hero { grid-template-columns: 1fr; padding: 50px 0 80px; }
  .build-grid { grid-template-columns: repeat(2, 1fr); }
  .story-section, .about-builder { grid-template-columns: 1fr; }
  .custom-section { grid-template-columns: 1fr; }
  .custom-section.layout-right img { order: initial; }
}
@media (max-width: 560px) {
  .site-header { align-items: flex-start; padding-top: 16px; padding-bottom: 16px; }
  nav { gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
  main { padding: 28px 16px; }
  .hero-grid { grid-template-columns: 1fr; }
  .public-hero h1 { font-size: 2.65rem; }
  .project-facts, .build-grid { grid-template-columns: 1fr; }
  .project-facts div { border-right: 0; border-bottom: 1px solid var(--line); }
  .project-facts div:last-child { border-bottom: 0; }
  .story-section, .about-builder, .build-section { padding: 65px 0; }
  .public-cta { padding: 34px 26px; align-items: flex-start; flex-direction: column; }
}
