:root {
  --ink: #0b1220;
  --ink-soft: #445069;
  --paper: #f5f7f4;
  --white: #ffffff;
  --line: #dbe1dd;
  --mint: #8df0c8;
  --mint-strong: #38c995;
  --mint-dark: #087a57;
  --navy: #0c1d2e;
  --orange: #ffb45f;
  --red: #b42318;
  --shadow: 0 22px 65px rgba(20, 38, 50, .1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { width: 100%; overflow-x: clip; scroll-behavior: smooth; }
body { width: 100%; margin: 0; min-width: 300px; overflow-x: clip; background: var(--paper); }
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
button, summary { -webkit-tap-highlight-color: transparent; }

.site-header, .dashboard-header {
  width: min(1180px, calc(100% - 48px));
  height: 94px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 10;
}

.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 20px; font-weight: 760; letter-spacing: -.03em; }
.brand.small { font-size: 17px; }
.brand-mark, .mini-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 9px;
  transform: rotate(45deg);
}
.brand-mark span, .mini-mark span { width: 11px; height: 11px; border: 2px solid var(--mint-dark); border-radius: 3px; }
.site-header nav { display: flex; align-items: center; gap: 34px; font-size: 14px; font-weight: 600; }
.site-header nav > a:not(.nav-button) { color: #526077; transition: color .2s; }
.site-header nav > a:hover { color: var(--ink); }
.nav-button { padding: 11px 17px; color: var(--white); background: var(--ink); border-radius: 9px; }

.hero {
  width: min(1180px, calc(100% - 48px));
  min-height: 680px;
  margin: auto;
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  align-items: center;
  gap: 64px;
  padding: 70px 0 94px;
}
.eyebrow { color: var(--mint-dark); font-size: 12px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow.light { color: var(--mint); }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--mint-strong); box-shadow: 0 0 0 5px rgba(56, 201, 149, .12); }
.hero h1, .auth-intro h1 {
  max-width: 700px;
  margin: 21px 0 24px;
  font-size: clamp(55px, 6.2vw, 88px);
  line-height: .94;
  letter-spacing: -.064em;
  font-weight: 780;
}
.hero h1 em { color: var(--mint-dark); font-family: Georgia, serif; font-weight: 400; }
.hero-lead { max-width: 560px; color: var(--ink-soft); font-size: 20px; line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.button {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 14px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 720;
  font-size: 14px;
  cursor: pointer;
  transition: transform .18s, box-shadow .18s, background .18s;
}
.button:hover { transform: translateY(-1px); }
.button.primary { color: var(--ink); background: var(--mint); box-shadow: 0 10px 28px rgba(56, 201, 149, .18); }
.button.primary:hover { background: #a3f5d4; box-shadow: 0 13px 32px rgba(56, 201, 149, .25); }
.button.secondary { color: var(--ink); background: transparent; border-color: #c9d2cd; }
.button.secondary:hover { background: var(--white); }
.button.full { width: 100%; }
.edition-row { display: flex; align-items: center; gap: 12px; margin-top: 30px; color: #657188; font-size: 12px; font-weight: 720; text-transform: uppercase; letter-spacing: .08em; }
.edition-row i { width: 3px; height: 3px; background: #aeb8b1; border-radius: 50%; }

.hero-visual { height: 520px; position: relative; display: grid; place-items: center; }
.hero-visual::before {
  content: "";
  position: absolute;
  inset: 30px;
  background-image: radial-gradient(#aebdb5 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: .43;
  mask-image: radial-gradient(circle, #000 10%, transparent 68%);
}
.ambient { position: absolute; border-radius: 50%; filter: blur(1px); }
.ambient.one { width: 290px; height: 290px; top: 92px; left: 89px; background: rgba(141, 240, 200, .36); }
.ambient.two { width: 150px; height: 150px; right: 40px; bottom: 70px; background: rgba(255, 180, 95, .24); }
.gate-card {
  width: 220px;
  min-height: 260px;
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 28px;
  box-shadow: 0 35px 70px rgba(8, 26, 40, .25);
  transform: rotate(-2deg);
}
.mini-mark { width: 48px; height: 48px; border-color: var(--mint); border-radius: 13px; margin-bottom: 26px; }
.mini-mark span { border-color: var(--white); }
.gate-card small { color: #94a6b8; font-size: 11px; letter-spacing: .09em; text-transform: uppercase; }
.gate-card strong { margin-top: 5px; font-size: 25px; letter-spacing: -.03em; }
.mini-menu { display: flex; gap: 7px; margin-top: 32px; }
.mini-menu i { width: 34px; height: 4px; background: #30455a; border-radius: 4px; }
.mini-menu i:first-child { background: var(--mint); }
.route-card {
  width: 174px;
  position: absolute;
  z-index: 4;
  display: grid;
  grid-template-columns: 28px 1fr;
  padding: 16px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(190, 202, 195, .75);
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(25, 49, 57, .11);
  backdrop-filter: blur(12px);
}
.route-card.source { left: 0; top: 90px; }
.route-card.destination { right: 0; bottom: 78px; }
.route-card > span { grid-row: 1 / 3; color: var(--mint-dark); font-size: 11px; font-weight: 800; }
.route-card b { font-size: 14px; }
.route-card small { color: #6d798b; font-size: 11px; margin-top: 4px; }
.route-line { width: 95px; height: 1px; position: absolute; z-index: 2; top: 163px; left: 125px; background: #8aa197; transform: rotate(18deg); }
.route-line.outgoing { top: auto; left: auto; bottom: 153px; right: 126px; transform: rotate(18deg); }
.route-line span { position: absolute; width: 7px; height: 7px; top: -3px; right: 0; border-radius: 50%; background: var(--mint-dark); }

.proof-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.proof-strip > div { padding: 35px 20px; text-align: center; border-right: 1px solid var(--line); }
.proof-strip > div:last-child { border: 0; }
.proof-strip strong { display: block; font-family: Georgia, serif; font-size: 28px; font-weight: 400; }
.proof-strip span { display: block; margin-top: 4px; color: #6c7787; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; }

.section { width: min(1180px, calc(100% - 48px)); margin: auto; padding: 128px 0; }
.section-heading { max-width: 630px; }
.section h2, .split-section h2, .connect-section h2 { margin: 16px 0; font-size: clamp(42px, 5vw, 64px); line-height: 1.02; letter-spacing: -.05em; }
.section-heading > p, .connect-section > div > p { color: var(--ink-soft); font-size: 18px; line-height: 1.65; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 65px; }
.feature-grid article { min-height: 270px; padding: 30px; background: var(--white); border: 1px solid var(--line); border-radius: 18px; transition: transform .2s, box-shadow .2s; }
.feature-grid article:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature-number { color: var(--mint-dark); font-size: 11px; font-weight: 800; letter-spacing: .1em; }
.feature-grid h3 { margin: 76px 0 12px; font-size: 21px; letter-spacing: -.025em; }
.feature-grid p { color: var(--ink-soft); line-height: 1.65; margin: 0; }

.split-section { display: grid; grid-template-columns: 1fr 1fr; background: var(--navy); color: var(--white); }
.principle-panel, .detail-list { padding: clamp(60px, 8vw, 120px); }
.principle-panel { border-right: 1px solid rgba(255, 255, 255, .12); }
.principle-panel p { max-width: 520px; color: #a9b8c6; font-size: 17px; line-height: 1.75; }
.detail-list { display: flex; flex-direction: column; justify-content: center; }
.detail-list > div { display: grid; grid-template-columns: 78px 1fr; padding: 28px 0; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.detail-list > div:last-child { border: 0; }
.detail-list > div > span { color: var(--mint); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.detail-list h3 { margin: 0 0 8px; font-size: 18px; }
.detail-list p { margin: 0; color: #9cafbd; line-height: 1.6; }

.connect-section { width: min(1180px, calc(100% - 48px)); margin: auto; padding: 130px 0; display: grid; grid-template-columns: 1fr 430px; align-items: center; gap: 90px; }
.address-card { padding: 30px; background: var(--white); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.address-card > span { display: block; color: #718072; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.address-card > div { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 24px; padding: 14px 15px; background: #eef3ef; border-radius: 10px; }
.address-card code { font-size: 17px; font-weight: 700; }
.address-card button { border: 0; background: transparent; color: var(--mint-dark); font-size: 12px; font-weight: 800; cursor: pointer; }
.address-card ul { padding: 0; margin: 0; list-style: none; }
.address-card li { display: flex; justify-content: space-between; padding: 12px 2px; border-top: 1px solid var(--line); font-size: 13px; }
.address-card li span { color: #6f7b8d; }

footer { padding: 35px max(24px, calc((100% - 1180px) / 2)); display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 42px; background: #07131f; color: var(--white); }
footer .brand-mark { border-color: var(--mint); }
footer p, footer > span { color: #8193a3; font-size: 12px; }

/* Authentication */
.site-header.compact .back-link { color: #667286; font-size: 13px; font-weight: 700; }
.auth-layout { min-height: calc(100vh - 94px); display: grid; grid-template-columns: 1.05fr .95fr; background: var(--navy); }
.auth-intro { padding: clamp(60px, 9vw, 145px); color: var(--white); background-image: radial-gradient(circle at 15% 80%, rgba(141, 240, 200, .13), transparent 35%), radial-gradient(#284155 1px, transparent 1px); background-size: auto, 26px 26px; }
.auth-intro h1 { margin-top: 25px; font-size: clamp(52px, 6vw, 82px); }
.auth-intro > p { max-width: 540px; color: #a9bac7; font-size: 18px; line-height: 1.7; }
.auth-note { max-width: 490px; display: grid; grid-template-columns: 100px 1fr; margin-top: 70px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .13); }
.auth-note span { color: var(--mint); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; }
.auth-note p { margin: 0; color: #91a4b3; line-height: 1.55; }
.login-card { width: min(450px, calc(100% - 48px)); align-self: center; justify-self: center; padding: 44px; background: var(--white); border-radius: 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, .28); }
.login-card > div:first-child { text-align: center; }
.lock-icon { width: 46px; height: 46px; margin: auto; display: grid; place-items: center; color: var(--mint-dark); background: #e6f8f0; border-radius: 14px; font-size: 24px; }
.login-card h2 { margin: 18px 0 7px; font-size: 27px; letter-spacing: -.035em; }
.login-card p { color: #748095; line-height: 1.5; }
.login-card form { display: grid; gap: 18px; margin-top: 28px; }
label { color: #2c3749; font-size: 13px; font-weight: 720; }
label > span { display: block; float: right; color: #8a95a5; font-size: 11px; font-weight: 500; }
input { width: 100%; margin-top: 8px; padding: 13px 14px; color: var(--ink); background: #fbfcfb; border: 1px solid #cfd7d2; border-radius: 9px; outline: 0; transition: border .15s, box-shadow .15s; }
input:focus { border-color: var(--mint-strong); box-shadow: 0 0 0 4px rgba(56, 201, 149, .12); }
.login-card .security-note { margin: 20px 0 0; text-align: center; font-size: 11px; }
.alert { margin: 20px 0; padding: 13px 15px; border-radius: 9px; font-size: 13px; font-weight: 650; }
.alert.error { color: #8a1c14; background: #fff0ee; border: 1px solid #ffd0ca; }
.alert.success { color: #066445; background: #eafaf3; border: 1px solid #bfead9; }

/* Dashboard */
.dashboard-header { width: 100%; height: 76px; padding: 0 30px; background: var(--white); border-bottom: 1px solid var(--line); }
.account-chip { display: flex; align-items: center; gap: 10px; }
.account-chip > span { width: 34px; height: 34px; display: grid; place-items: center; color: var(--ink); background: var(--mint); border-radius: 50%; font-size: 11px; font-weight: 850; }
.account-chip > div { display: grid; }
.account-chip small { color: #8a94a2; font-size: 9px; text-transform: uppercase; letter-spacing: .09em; }
.account-chip strong { font-size: 12px; }
.account-chip form { margin-left: 10px; padding-left: 20px; border-left: 1px solid var(--line); }
.account-chip button { color: #667286; background: none; border: 0; font-size: 12px; font-weight: 700; cursor: pointer; }
.dashboard { min-height: calc(100vh - 76px); display: grid; grid-template-columns: 235px 1fr; }
.dashboard-sidebar { padding: 32px 24px; display: flex; flex-direction: column; background: #0a1928; color: var(--white); }
.dashboard-sidebar > div:first-child { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.dashboard-sidebar .active { width: 32px; height: 32px; display: grid; place-items: center; color: var(--mint); background: rgba(141, 240, 200, .1); border-radius: 8px; }
.sidebar-future { margin-top: auto; padding: 20px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; }
.sidebar-future span { color: var(--mint); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.sidebar-future p { margin: 10px 0 0; color: #7f94a6; font-size: 11px; }
.dashboard-sidebar > a { margin-top: 24px; color: #8799a8; font-size: 11px; font-weight: 650; }
.dashboard-main { width: min(1040px, calc(100% - 64px)); margin: 0 auto; padding: 58px 0 100px; }
.dashboard-title { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 35px; }
.dashboard-title h1 { margin: 9px 0 8px; font-size: 42px; letter-spacing: -.045em; }
.dashboard-title p { margin: 0; color: #778294; font-size: 13px; }
.server-list { display: grid; gap: 14px; }
.server-card { background: var(--white); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 5px 20px rgba(12, 29, 46, .04); overflow: hidden; }
.server-summary { min-height: 94px; padding: 21px 24px; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 15px; }
.server-glyph { width: 40px; height: 40px; display: grid; place-items: center; color: var(--mint-dark); background: #e7f8f1; border-radius: 11px; font-size: 22px; }
.server-summary h2 { margin: 0 0 4px; font-size: 17px; letter-spacing: -.02em; }
.server-summary code { color: #728093; font-size: 12px; }
.last-used { color: #87919f; font-size: 11px; }
.server-card > details { border-top: 1px solid var(--line); }
.server-card > details > summary { padding: 12px 24px; color: #667286; background: #fbfcfb; cursor: pointer; font-size: 11px; font-weight: 750; list-style: none; }
.server-card > details > summary::after { content: "+"; float: right; font-size: 16px; }
.server-card > details[open] > summary::after { content: "−"; }
.server-form { padding: 25px; }
.form-grid { display: grid; grid-template-columns: 1fr 180px; gap: 19px; }
.form-grid .wide { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.danger-row { display: flex; justify-content: space-between; align-items: center; padding: 20px 25px; background: #fff9f8; border-top: 1px solid #f1dad7; }
.danger-row > div { display: grid; gap: 3px; }
.danger-row strong { color: #7d201a; font-size: 12px; }
.danger-row span { color: #9b6b67; font-size: 11px; }
.confirm-delete { position: relative; }
.confirm-delete > summary { color: var(--red); cursor: pointer; font-size: 12px; font-weight: 750; list-style: none; }
.confirm-delete form { position: absolute; z-index: 4; right: 0; top: 25px; width: 170px; padding: 12px; background: var(--white); border: 1px solid #efc8c3; border-radius: 9px; box-shadow: var(--shadow); }
.confirm-delete button { width: 100%; padding: 9px; color: var(--white); background: var(--red); border: 0; border-radius: 7px; font-size: 11px; font-weight: 750; cursor: pointer; }
.empty-state { padding: 70px 25px; text-align: center; color: #7a8796; background: var(--white); border: 1px dashed #cbd4ce; border-radius: 14px; }
.empty-state > span { font-size: 38px; color: var(--mint-dark); }
.empty-state h3 { margin: 15px 0 8px; color: var(--ink); }
.empty-state p { margin: 0; }
.add-dialog { width: min(590px, calc(100% - 32px)); padding: 0; border: 0; border-radius: 18px; box-shadow: 0 30px 90px rgba(5, 19, 30, .28); }
.add-dialog::backdrop { background: rgba(5, 17, 27, .64); backdrop-filter: blur(3px); }
.dialog-heading { display: flex; justify-content: space-between; padding: 28px 30px 20px; border-bottom: 1px solid var(--line); }
.dialog-heading h2 { margin: 7px 0 5px; font-size: 26px; letter-spacing: -.035em; }
.dialog-heading p { margin: 0; color: #7a8696; font-size: 12px; }
.dialog-heading > button { align-self: start; width: 32px; height: 32px; color: #748090; background: #f1f4f1; border: 0; border-radius: 8px; cursor: pointer; font-size: 21px; }

.error-page { width: min(1180px, calc(100% - 48px)); min-height: 100vh; margin: auto; padding: 32px 0; display: flex; flex-direction: column; }
.error-page > div { margin: auto; text-align: center; }
.error-page > div > span { color: var(--mint-dark); font-family: Georgia, serif; font-size: 85px; }
.error-page h1 { margin: 4px 0 10px; font-size: 42px; letter-spacing: -.04em; }
.error-page p { margin: 0 0 28px; color: var(--ink-soft); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 55px; }
  .hero-copy { text-align: center; }
  .hero-copy .hero-lead { margin-inline: auto; }
  .hero-actions, .edition-row { justify-content: center; }
  .hero-visual { max-width: 600px; width: 100%; margin: -30px auto 0; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-grid article { min-height: 210px; }
  .feature-grid h3 { margin-top: 48px; }
  .split-section, .connect-section, .auth-layout { grid-template-columns: 1fr; }
  .principle-panel { border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .12); }
  .connect-section { gap: 35px; }
  .address-card { width: 100%; }
  .auth-layout { padding-bottom: 70px; }
  .auth-intro { padding-bottom: 70px; }
  .login-card { margin-top: -35px; }
  .dashboard { grid-template-columns: 1fr; }
  .dashboard-sidebar { display: none; }
}

@media (max-width: 640px) {
  .site-header { width: calc(100% - 30px); height: 76px; }
  .site-header nav { gap: 0; }
  .site-header nav > a:not(.nav-button) { display: none; }
  .site-header .nav-button { padding: 10px 12px; font-size: 12px; }
  .hero, .section, .connect-section { width: calc(100% - 30px); }
  .hero > * { min-width: 0; }
  .hero { min-height: auto; padding: 60px 0 70px; }
  .hero-copy { width: 100%; min-width: 0; }
  .hero h1 { width: 100%; font-size: clamp(42px, 12vw, 48px); }
  .hero h1 em { display: block; font-size: .9em; }
  .hero-lead { font-size: 17px; }
  .hero-visual { width: 100%; height: 400px; transform: none; margin: -15px 0 -40px; overflow: hidden; }
  .gate-card { width: 190px; min-height: 230px; }
  .route-card { width: 148px; padding: 13px; }
  .route-card.source { left: 0; }
  .route-card.destination { right: 0; }
  .proof-strip { grid-template-columns: 1fr 1fr; }
  .proof-strip > div:nth-child(2) { border-right: 0; }
  .proof-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .section { padding: 85px 0; }
  .principle-panel, .detail-list { padding: 60px 25px; }
  .detail-list > div { grid-template-columns: 65px 1fr; }
  .connect-section { padding: 85px 0; }
  footer { grid-template-columns: 1fr; gap: 5px; }
  footer p { margin: 14px 0 3px; }
  .auth-intro { padding: 70px 25px 65px; }
  .auth-intro h1 { font-size: 49px; }
  .auth-note { grid-template-columns: 1fr; gap: 10px; margin-top: 45px; }
  .login-card { padding: 30px 24px; }
  .dashboard-header { padding: 0 16px; }
  .account-chip > div, .account-chip form { display: none; }
  .dashboard-main { width: calc(100% - 28px); padding-top: 35px; }
  .dashboard-title { align-items: start; flex-direction: column; }
  .dashboard-title .button { width: 100%; }
  .server-summary { grid-template-columns: 42px 1fr; }
  .last-used { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .wide { grid-column: auto; }
  .danger-row { align-items: start; gap: 15px; }
}

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