:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
  color: #f8fafc;
  background: #07111f;
  font-synthesis: none;
  line-height: 1.6;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 82% 10%, rgb(249 115 22 / 18%), transparent 28rem),
    radial-gradient(circle at 8% 38%, rgb(14 165 233 / 12%), transparent 30rem),
    #07111f;
}

a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.site-header {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand { display: inline-flex; align-items: center; gap: 12px; color: #fff; font-weight: 750; letter-spacing: -.02em; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgb(255 255 255 / 18%); border-radius: 11px; color: #fff7ed; background: linear-gradient(145deg, #f97316, #c2410c); font-size: .82rem; box-shadow: 0 8px 30px rgb(249 115 22 / 22%); }
.header-actions { display: flex; align-items: center; gap: 16px; }
.auth-link { color: #cbd5e1; font-size: .85rem; font-weight: 700; text-underline-offset: 5px; }
.local-badge { padding: 5px 10px; border: 1px solid #334155; border-radius: 999px; color: #94a3b8; font: 700 .68rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .13em; }

main, footer { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.hero { min-height: 660px; padding: 88px 0 100px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 350px); gap: clamp(48px, 6vw, 80px); align-items: center; }
.eyebrow, .panel-kicker { margin: 0 0 14px; color: #fb923c; font-size: .76rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
h1 { max-width: 800px; margin: 0; font-size: clamp(3.1rem, 6vw, 4.9rem); line-height: .98; letter-spacing: -.06em; }
.headline-line { white-space: nowrap; }
.lead { max-width: 660px; margin: 32px 0 0; color: #aebdce; font-size: clamp(1rem, 2vw, 1.2rem); }
.hero-actions { margin-top: 38px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.primary-button { min-height: 48px; padding: 0 22px; border: 0; border-radius: 9px; color: #1c0d04; background: #fb923c; font-weight: 800; cursor: pointer; box-shadow: 0 10px 30px rgb(249 115 22 / 22%); transition: transform .2s ease, background .2s ease; }
.primary-button:hover { transform: translateY(-2px); background: #fdba74; }
.primary-button:focus-visible, a:focus-visible { outline: 3px solid #38bdf8; outline-offset: 4px; }
.text-link { color: #cbd5e1; font-weight: 700; text-underline-offset: 5px; }

.status-panel { padding: 28px; border: 1px solid rgb(148 163 184 / 18%); border-radius: 18px; background: linear-gradient(145deg, rgb(15 30 50 / 94%), rgb(8 19 33 / 94%)); box-shadow: 0 25px 70px rgb(0 0 0 / 28%); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.panel-heading h2 { margin: 0; font-size: 1.45rem; }
.panel-kicker { margin-bottom: 4px; }
.status-dot { width: 12px; height: 12px; margin-top: 8px; border-radius: 50%; background: #f59e0b; box-shadow: 0 0 0 6px rgb(245 158 11 / 12%); }
.status-dot.is-online { background: #22c55e; box-shadow: 0 0 0 6px rgb(34 197 94 / 12%), 0 0 24px rgb(34 197 94 / 45%); }
.status-dot.is-offline { background: #ef4444; box-shadow: 0 0 0 6px rgb(239 68 68 / 12%); }
.status-message { margin: 24px 0; padding: 12px 14px; border: 1px solid #29394f; border-radius: 9px; color: #cbd5e1; background: #091522; font: .8rem/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; }
.status-list { margin: 0; }
.status-list div { padding: 12px 0; display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid rgb(148 163 184 / 12%); }
.status-list dt { color: #718198; }
.status-list dd { margin: 0; text-align: right; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; }

.principles { padding: 0 0 100px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; }
.principles article { padding: 30px; border-top: 1px solid #27374b; background: rgb(10 24 41 / 58%); }
.principles .number { color: #fb923c; font: 700 .72rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.principles h2 { margin: 28px 0 8px; font-size: 1.3rem; }
.principles p { margin: 0; color: #8fa0b5; }

.roadmap { padding: 80px 0 110px; border-top: 1px solid #233248; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 40px; }
.section-heading h2 { margin: 0; font-size: clamp(2.3rem, 5vw, 4.2rem); letter-spacing: -.05em; }
.section-heading > p { max-width: 390px; margin: 0 0 8px; color: #8fa0b5; }
.roadmap-list { margin: 52px 0 0; padding: 0; list-style: none; border-top: 1px solid #29394f; }
.roadmap-list li { min-height: 88px; display: grid; grid-template-columns: 70px 1fr auto; align-items: center; gap: 20px; border-bottom: 1px solid #29394f; color: #66778d; }
.roadmap-list li > span { font: 700 .76rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.roadmap-list strong { display: block; color: #91a0b3; font-size: 1.16rem; }
.roadmap-list small { color: #66778d; }
.roadmap-list b { padding: 4px 9px; border: 1px solid #2d3d51; border-radius: 999px; font-size: .72rem; }
.roadmap-list .done strong, .roadmap-list .current strong { color: #f8fafc; }
.roadmap-list .done > span, .roadmap-list .done b { color: #4ade80; }
.roadmap-list .current { background: linear-gradient(90deg, rgb(249 115 22 / 8%), transparent 60%); }
.roadmap-list .current > span, .roadmap-list .current b { color: #fb923c; }

footer { padding: 28px 0 44px; display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid #233248; color: #66778d; font-size: .8rem; }
footer p { margin: 0; }

.auth-main { min-height: calc(100vh - 100px); display: grid; place-items: center; padding: 48px 0 100px; }
.auth-card { width: min(100%, 560px); padding: clamp(28px, 6vw, 52px); border: 1px solid rgb(148 163 184 / 18%); border-radius: 20px; background: linear-gradient(145deg, rgb(15 30 50 / 96%), rgb(8 19 33 / 96%)); box-shadow: 0 25px 70px rgb(0 0 0 / 28%); }
.auth-card h1 { font-size: clamp(2.2rem, 7vw, 3.5rem); }
.auth-card .lead { margin-top: 20px; }
.auth-form { margin-top: 32px; }
.auth-form label { display: block; margin-bottom: 8px; color: #cbd5e1; font-weight: 700; }
.auth-form input { width: 100%; min-height: 50px; margin-bottom: 18px; padding: 0 14px; border: 1px solid #3b4d64; border-radius: 9px; color: #f8fafc; background: #091522; font: inherit; }
.auth-form input:focus { border-color: #38bdf8; outline: 2px solid rgb(56 189 248 / 24%); }
.secondary-button { min-height: 44px; padding: 0 18px; border: 1px solid #3b4d64; border-radius: 9px; color: #e2e8f0; background: transparent; font-weight: 700; cursor: pointer; }
.account-details { margin: 18px 0; }
.account-details div { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid rgb(148 163 184 / 12%); }
.account-details dt { color: #718198; }
.account-details dd { margin: 0; overflow-wrap: anywhere; }
.auth-note { margin: 22px 0 0; color: #718198; font-size: .84rem; }
.button-link { display: inline-flex; align-items: center; justify-content: center; margin-right: 10px; text-decoration: none; }
.header-link { color: #cbd5e1; font-weight: 700; text-decoration: none; }
.admin-main { padding: 64px 0 96px; }
.admin-hero { margin-bottom: 32px; }
.admin-card { margin-top: 24px; padding: clamp(24px, 4vw, 40px); border: 1px solid rgb(148 163 184 / 18%); border-radius: 20px; background: linear-gradient(145deg, rgb(15 30 50 / 96%), rgb(8 19 33 / 96%)); }
.admin-card h2 { margin: 0; font-size: clamp(1.6rem, 4vw, 2.3rem); }
.member-form { display: grid; grid-template-columns: 1fr 1.4fr .8fr auto; gap: 16px; align-items: end; margin-top: 24px; }
.member-form label { display: grid; gap: 8px; color: #cbd5e1; font-weight: 700; }
.member-form input, .member-form select { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid #3b4d64; border-radius: 9px; color: #f8fafc; background: #091522; font: inherit; }
.admin-card .section-heading { align-items: center; }
.table-wrap { overflow-x: auto; }
.members-table { width: 100%; margin-top: 20px; border-collapse: collapse; }
.members-table th, .members-table td { padding: 14px 12px; border-bottom: 1px solid #29394f; text-align: left; white-space: nowrap; }
.members-table th { color: #8fa0b5; font-size: .82rem; }
.table-button, .invitation-fields button { padding: 8px 12px; border: 1px solid #3b4d64; border-radius: 8px; color: #e2e8f0; background: transparent; cursor: pointer; }
.members-table td .table-button + .table-button { margin-left: 8px; }
.invitation-fields > div { padding: 16px 0; border-bottom: 1px solid #29394f; }
.invitation-fields dt { margin-bottom: 8px; color: #718198; }
.invitation-fields dd { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin: 0; }
.invitation-fields pre { margin: 0; white-space: pre-wrap; color: #e2e8f0; font: inherit; line-height: 1.7; }
.install-main { min-height: calc(100vh - 100px); padding: 64px 0 96px; }
.install-card { padding: clamp(28px, 5vw, 52px); border: 1px solid rgb(148 163 184 / 18%); border-radius: 20px; background: linear-gradient(145deg, rgb(15 30 50 / 96%), rgb(8 19 33 / 96%)); }
.install-card h1 { font-size: clamp(2.4rem, 7vw, 4.4rem); }
.install-action { margin-top: 28px; }
.install-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin: 32px 0; }
.install-grid article { padding: 24px; border: 1px solid #29394f; border-radius: 14px; background: #091522; }
.install-grid h2 { margin: 0 0 18px; }
.install-grid ol { margin: 0; padding-left: 1.4rem; color: #cbd5e1; line-height: 1.9; }
.notice-box { margin: 24px 0; padding: 20px; border-left: 4px solid #fb923c; border-radius: 8px; background: rgb(249 115 22 / 8%); }
.notice-box p { margin: 8px 0 0; color: #aebdce; }
.push-panel { margin-top: 28px; padding-top: 24px; border-top: 1px solid #29394f; }
.push-panel h3 { margin: 0 0 8px; font-size: 1.25rem; }
.push-panel > p { color: #8fa0b5; }
.push-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.stack-form { display: grid; gap: 18px; margin-top: 24px; }
.stack-form label, .stack-form fieldset { display: grid; gap: 8px; color: #cbd5e1; font-weight: 700; }
.stack-form input, .stack-form select, .stack-form textarea { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid #3b4d64; border-radius: 9px; color: #f8fafc; background: #091522; font: inherit; }
.stack-form textarea { resize: vertical; }
.stack-form fieldset { margin: 0; padding: 16px; border: 1px solid #29394f; border-radius: 10px; }
.stack-form .inline-check { display: flex; align-items: center; gap: 10px; }
.stack-form .inline-check input, .check-grid input { width: auto; min-height: auto; }
.compact-form { padding-bottom: 24px; border-bottom: 1px solid #29394f; }
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.check-grid label { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.card-list { display: grid; gap: 14px; }
.manage-card { padding: 20px; border: 1px solid #29394f; border-radius: 12px; background: #091522; }
.manage-card h3 { margin: 0 0 12px; }
.manage-card .stack-form { margin-top: 0; }
.notice-list { display: grid; gap: 10px; margin-top: 22px; }
.notice-row { width: 100%; padding: 18px; display: grid; gap: 5px; border: 1px solid #29394f; border-left: 4px solid #64748b; border-radius: 10px; color: #f8fafc; background: #091522; text-align: left; cursor: pointer; }
.notice-row span { color: #94a3b8; font-size: .86rem; }
.notice-row.priority-important { border-left-color: #fb923c; }
.notice-row.priority-urgent { border-left-color: #ef4444; }
.notice-body { margin: 24px 0; padding: 22px; white-space: pre-wrap; border: 1px solid #29394f; border-radius: 10px; color: #e2e8f0; background: #091522; }
.notice-actions { margin: 20px 0; }
.muted-line, .empty-state { color: #8fa0b5; }
.members-table td.wrap-cell { white-space: pre-wrap; min-width: 220px; }

@media (max-width: 820px) {
  .hero { min-height: auto; padding-top: 56px; grid-template-columns: 1fr; }
  .status-panel { max-width: 560px; }
  .principles { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .member-form { grid-template-columns: 1fr; }
  .install-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .site-header, main, footer { width: min(100% - 28px, 1180px); }
  .hero { padding: 48px 0 76px; gap: 42px; }
  h1 { font-size: clamp(2.8rem, 15vw, 4.5rem); }
  .headline-line { white-space: normal; }
  .status-panel { padding: 22px; }
  .status-list div { align-items: flex-start; flex-direction: column; gap: 2px; }
  .status-list dd { text-align: left; }
  .principles { padding-bottom: 70px; }
  .section-heading > p { margin-top: -20px; }
  .roadmap-list li { grid-template-columns: 44px 1fr; padding: 16px 0; }
  .roadmap-list b { grid-column: 2; justify-self: start; }
  footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .primary-button { transition: none; }
}
