:root {
  --ink: #102a33;
  --muted: #60747b;
  --navy: #073b4c;
  --navy-2: #0a5166;
  --teal: #0a9396;
  --teal-dark: #087578;
  --cream: #f6f4ed;
  --paper: #ffffff;
  --line: #dbe4e5;
  --coral: #ee6c4d;
  --danger: #b42318;
  --shadow: 0 18px 48px rgba(7, 59, 76, .10);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--cream);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 90% 0, #d9eeee 0, transparent 32rem), var(--cream); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.site-header { position: sticky; top: 0; z-index: 10; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 28px; padding: 14px max(24px, calc((100vw - 1240px) / 2)); color: white; background: rgba(7, 59, 76, .96); backdrop-filter: blur(14px); box-shadow: 0 8px 24px rgba(7, 59, 76, .15); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px 12px 12px 3px; color: var(--navy); background: #fff; font-weight: 900; font-style: italic; }
.brand strong, .brand small { display: block; }
.brand small { color: #b9d8dc; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
.primary-nav { display: flex; justify-content: center; gap: 6px; }
.nav-link { width: auto; margin: 0; padding: 9px 12px; border: 0; border-radius: 999px; color: #dcebee; background: transparent; text-decoration: none; font-size: .9rem; font-weight: 650; }
.nav-link:hover, .nav-link.is-active { color: var(--navy); background: white; }
.auth-actions { display: flex; gap: 7px; }
.team-context { display: flex; justify-content: space-between; align-items: center; gap: 20px; max-width: 1240px; margin: 20px auto 0; padding: 12px 18px; border: 1px solid #c9dada; border-radius: 16px; background: rgba(255,255,255,.78); box-shadow: 0 8px 24px rgba(7, 59, 76, .05); }
.team-context strong, .team-context span { display: block; }
.context-controls { display: flex; gap: 8px; width: min(540px, 58vw); }
.context-controls input { margin: 0; }
main { max-width: 1240px; min-height: calc(100vh - 230px); margin: 0 auto; padding: 34px 24px 70px; }
.hero { position: relative; display: grid; grid-template-columns: 1.25fr .75fr; align-items: center; min-height: 390px; overflow: hidden; padding: clamp(34px, 6vw, 78px); border-radius: 30px; color: white; background: linear-gradient(135deg, var(--navy), var(--navy-2)); box-shadow: var(--shadow); }
.hero h1 { max-width: 760px; margin: 8px 0 18px; font-size: clamp(2.4rem, 5vw, 5rem); line-height: .98; letter-spacing: -.045em; }
.hero p { max-width: 650px; color: #d7e9eb; font-size: 1.12rem; line-height: 1.7; }
.hero-actions, .button-row { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-art { position: relative; margin: 0; padding: 14px; border: 1px solid rgba(255,255,255,.28); border-radius: 24px; background: rgba(255,255,255,.12); transform: rotate(2deg); box-shadow: 0 24px 50px rgba(0,0,0,.2); }
.hero-art img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 16px; }
.hero-art figcaption { margin-top: 10px; color: #d8eff0; font-size: .78rem; font-weight: 750; letter-spacing: .1em; text-align: center; text-transform: uppercase; }
.dragon-boat { position: absolute; top: 92px; right: -52px; width: 430px; height: 100px; transform: rotate(-7deg); }
.dragon-hull { position: absolute; left: 42px; bottom: 5px; display: flex; gap: 22px; width: 350px; height: 67px; padding: 13px 42px; border: 4px solid #f0c35b; border-radius: 55% 18% 65% 25%; background: linear-gradient(#e36645, #a93c2a); box-shadow: inset 0 -13px 0 rgba(91,30,24,.35); }
.dragon-hull::after { content: ""; position: absolute; left: 25px; right: 25px; bottom: 11px; height: 6px; border-radius: 50%; background: repeating-linear-gradient(90deg, #f0c35b 0 18px, #0a5166 18px 34px); }
.dragon-hull span { z-index: 1; width: 9px; height: 44px; border-radius: 8px; background: #f7dfa7; transform: rotate(18deg) translateY(-15px); box-shadow: 12px 24px 0 -2px #d39842; }
.dragon-head { position: absolute; z-index: 2; left: 4px; top: 1px; width: 74px; height: 64px; border: 4px solid #f0c35b; border-radius: 55% 40% 48% 35%; background: #d84f35; box-shadow: -12px -8px 0 -5px #f0c35b; }
.dragon-head::before, .dragon-head::after { content: ""; position: absolute; top: -18px; width: 20px; height: 28px; border: 5px solid #f0c35b; border-bottom: 0; border-radius: 80% 20% 0 0; transform: rotate(-18deg); }
.dragon-head::before { left: 7px; }.dragon-head::after { right: 3px; transform: scaleX(-1) rotate(-18deg); }
.dragon-head i, .dragon-head b { position: absolute; top: 17px; width: 9px; height: 9px; border: 3px solid white; border-radius: 50%; background: #102a33; }
.dragon-head i { left: 13px; }.dragon-head b { right: 12px; }
.dragon-tail { position: absolute; right: 0; top: 7px; width: 55px; height: 75px; border-right: 13px solid #f0c35b; border-top: 10px solid #d84f35; border-radius: 0 75% 20% 0; transform: rotate(18deg); }
.wake { position: absolute; right: -100px; width: 480px; height: 110px; border: 3px solid rgba(185,232,235,.25); border-color: rgba(185,232,235,.25) transparent transparent; border-radius: 50%; }
.wake-one { top: 170px; }.wake-two { top: 205px; right: -50px; }
.page-heading { max-width: 760px; margin: 18px 0 32px; }
.page-heading h1 { margin: 4px 0 10px; font-size: clamp(2.25rem, 5vw, 4.2rem); letter-spacing: -.045em; }
.page-heading p { color: var(--muted); font-size: 1.08rem; line-height: 1.65; }
.eyebrow, .card-kicker { color: var(--teal-dark); font-size: .72rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.hero .eyebrow { color: #83d5d7; }
.notice { margin: 22px 0; padding: 13px 17px; border: 1px solid #efca88; border-radius: 14px; color: #654915; background: #fff7df; }
.card-grid { display: grid; gap: 20px; margin-top: 22px; }
.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { padding: clamp(22px, 3vw, 34px); border: 1px solid rgba(206,220,222,.9); border-radius: 22px; background: rgba(255,255,255,.92); box-shadow: 0 10px 30px rgba(7, 59, 76, .06); }
.card h2 { margin: 5px 0 8px; font-size: 1.45rem; letter-spacing: -.02em; }
.card p { color: var(--muted); line-height: 1.6; }
.card-heading { display: flex; gap: 14px; align-items: flex-start; }
.step { display: grid; flex: 0 0 auto; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: white; background: var(--teal); font-weight: 800; }
.account-card { display: grid; grid-template-columns: 1fr minmax(280px, .45fr); align-items: center; gap: 28px; margin-top: 20px; }
.private-card { border-top: 4px solid var(--teal); }
.wide-card { grid-column: 1 / -1; }
.pipeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; overflow: hidden; margin: 0 0 24px; border: 1px solid #cbdcde; border-radius: 18px; background: #cbdcde; box-shadow: 0 9px 24px rgba(7,59,76,.05); }
.pipeline div { position: relative; padding: 18px; background: rgba(255,255,255,.94); }
.pipeline div:not(:last-child)::after { content: "→"; position: absolute; z-index: 1; right: -10px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); border-radius: 50%; color: white; background: var(--teal); text-align: center; line-height: 18px; }
.pipeline strong, .pipeline span { display: block; }.pipeline span { margin-top: 4px; color: var(--muted); font-size: .8rem; line-height: 1.4; }
.coming-soon { border-style: dashed; background: rgba(255,255,255,.55); }
.status-chip { display: inline-flex; padding: 6px 10px; border-radius: 999px; color: var(--teal-dark); background: #dff3f2; font-size: .78rem; font-weight: 800; }
label { display: block; margin-top: 15px; color: #29434b; font-size: .84rem; font-weight: 750; }
input, select { width: 100%; min-height: 44px; margin-top: 6px; padding: 10px 12px; border: 1px solid #bdcccf; border-radius: 11px; color: var(--ink); background: white; outline: none; }
input:focus, select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(10,147,150,.14); }
input::placeholder { color: #8b9ba0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.checkbox-label { display: flex; align-items: center; gap: 10px; padding-top: 20px; }
.checkbox-label input { width: 18px; min-height: 18px; margin: 0; }
.input-action { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.input-action .button { min-height: 44px; }
.button { width: auto; min-height: 40px; margin: 0; padding: 9px 15px; border: 1px solid transparent; border-radius: 10px; cursor: pointer; font-weight: 760; transition: transform .15s ease, background .15s ease, box-shadow .15s ease; }
.button:hover { transform: translateY(-1px); }
.button:focus-visible, .nav-link:focus-visible { outline: 3px solid #f0c86b; outline-offset: 2px; }
.button-primary { color: white; background: var(--teal); box-shadow: 0 7px 18px rgba(10,147,150,.22); }
.button-primary:hover { background: var(--teal-dark); }
.button-secondary { color: var(--navy); border-color: #b7ced1; background: white; }
.button-quiet { color: white; border-color: rgba(255,255,255,.28); background: transparent; }
.button-danger { color: var(--danger); border-color: #efc4bf; background: #fff8f7; }
.full-width { width: 100%; margin-top: 16px; }
.button-row { margin-top: 14px; }.button-row .button { flex: 1; }
.helper { font-size: .88rem; }
.result-list { display: grid; gap: 8px; margin-top: 14px; }
.result-list button { width: 100%; padding: 11px 13px; border: 1px solid #c4d5d7; border-radius: 10px; color: var(--navy); background: #f7fbfb; cursor: pointer; text-align: left; font-weight: 700; }
.output { display: none; max-height: 330px; overflow: auto; margin: 15px 0 0; padding: 13px; border: 1px solid #d6e1e2; border-radius: 11px; color: #29434b; background: #f5f8f8; white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; }
.output.is-visible { display: block; }.output.compact { max-height: 160px; }
footer { display: flex; justify-content: space-between; gap: 20px; padding: 26px max(24px, calc((100vw - 1240px) / 2)); color: #c8dcdf; background: var(--navy); font-size: .85rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 980px) {
  .site-header { grid-template-columns: auto 1fr; }.primary-nav { grid-column: 1 / -1; order: 3; justify-content: flex-start; overflow-x: auto; padding-bottom: 2px; }.auth-actions { justify-self: end; }
  .hero { grid-template-columns: 1fr; }.hero-art { width: min(420px, 100%); margin: 26px auto 0; transform: none; }.pipeline { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .site-header { position: static; gap: 14px; padding: 14px 16px; }.brand small { display: none; }.auth-actions .button { padding: 8px 10px; font-size: .78rem; }
  .primary-nav { gap: 3px; }.nav-link { padding: 8px 10px; white-space: nowrap; font-size: .8rem; }
  .team-context { align-items: stretch; flex-direction: column; margin: 12px 12px 0; }.context-controls { width: 100%; }
  main { padding: 22px 14px 50px; }.hero { min-height: 0; padding: 34px 24px; border-radius: 22px; }.hero h1 { font-size: 2.55rem; }
  .two-up, .account-card, .field-row { grid-template-columns: 1fr; }.wide-card { grid-column: auto; }.pipeline { grid-template-columns: 1fr; }.pipeline div:not(:last-child)::after { right: 50%; top: auto; bottom: -10px; transform: translateX(50%) rotate(90deg); }
  .card { padding: 21px; border-radius: 18px; }.button-row { flex-direction: column; }.button-row .button { width: 100%; }
  footer { flex-direction: column; padding: 24px 18px; }
}

.role-picker { margin: 22px 0 12px; padding: 14px 16px 16px; border: 1px solid #c9dada; border-radius: 14px; }
.role-picker legend { padding: 0 6px; font-weight: 700; }
.role-picker p { margin: 4px 0 0; font-size: .9rem; }
.role-picker .checkbox-label { padding-top: 12px; }

.table-wrap { overflow-x: auto; margin-top: 16px; border: 1px solid #d6e1e2; border-radius: 12px; }
.member-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.member-table th, .member-table td { padding: 10px 12px; border-bottom: 1px solid #e3ecec; text-align: left; white-space: nowrap; }
.member-table thead th { background: #f2f7f7; color: var(--navy); font-weight: 750; }
.member-table tbody tr:last-child > * { border-bottom: 0; }
.member-table input[type="checkbox"] { width: 18px; min-height: 18px; margin: 0; }
.member-table .link-button { padding: 0; border: 0; background: none; color: var(--navy); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.member-table .state-requested { color: #8a5a00; font-weight: 700; }
.member-table .state-approved { color: #1f6b3a; }
.button:disabled { opacity: .5; cursor: not-allowed; }
.member-table .danger-link { color: #a4262c; }

[hidden] { display: none !important; }
.context-controls select { flex: 1; margin: 0; min-width: 0; }
.context-controls .button { white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; }
.team-context small { display: block; margin-top: 2px; color: var(--muted); font-size: .82rem; font-weight: 650; }
