:root {
  --ink: #2f180f;
  --muted: #785c4d;
  --paper: #fffaf3;
  --paper-strong: #ffffff;
  --line: rgba(77, 47, 32, 0.18);
  --accent: #c65a2c;
  --accent-dark: #963b1b;
  --wash: #f4dfce;
  --success: #176645;
  --danger: #9f3526;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --sans: Avenir, "Century Gothic", Futura, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  background:
    radial-gradient(circle at 85% 8%, rgba(241, 170, 118, 0.34), transparent 28rem),
    radial-gradient(circle at 8% 92%, rgba(212, 193, 158, 0.32), transparent 30rem),
    linear-gradient(135deg, #fffaf2, #f4eadc);
}

body.platform-mode {
  --ink: #132033;
  --muted: #58697f;
  --paper: #f5f8fc;
  --paper-strong: #ffffff;
  --line: rgba(32, 52, 79, 0.16);
  --accent: #1f5fa6;
  --accent-dark: #163f71;
  --wash: #d9e8fb;
  --success: #1b6b56;
  --danger: #a13d36;
  background:
    radial-gradient(circle at 88% 14%, rgba(82, 146, 217, 0.22), transparent 24rem),
    radial-gradient(circle at 10% 88%, rgba(164, 193, 227, 0.24), transparent 30rem),
    linear-gradient(145deg, #f7fbff, #eaf1f8 56%, #eef3f8);
}

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

.entry-shell { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; }

.entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px clamp(24px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 250, 243, 0.76);
  backdrop-filter: blur(18px);
}

body.platform-mode .entry-header {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.82), rgba(236, 244, 252, 0.9));
}

.business-brand { display: flex; align-items: center; gap: 14px; color: inherit; text-decoration: none; }
.business-brand strong { display: block; font-size: 1.08rem; }
.business-brand small { display: block; margin-top: 3px; color: var(--muted); }
.brand-mark, .signed-in-person > span {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--paper);
  background: var(--ink);
  font-family: var(--serif);
  font-size: 1.35rem;
}
body.platform-mode .brand-mark,
body.platform-mode .signed-in-person > span {
  border-radius: 14px;
  background:
    linear-gradient(160deg, #173862, #0f2036);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 12px 24px rgba(19, 32, 51, .16);
  font-family: var(--sans);
  font-weight: 800;
  letter-spacing: .04em;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }

.customer-link, .primary-action, .text-action, .close-action {
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
}
.customer-link { padding: 12px 18px; color: var(--accent-dark); background: rgba(255,255,255,.68); font-weight: 700; }

.entry-stage, .launcher-stage {
  width: min(1180px, calc(100% - 40px));
  margin: auto;
  padding: clamp(42px, 7vw, 90px) 0;
}
.entry-stage { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(340px, .75fr); gap: clamp(44px, 8vw, 110px); align-items: center; }
.entry-intro h1, .launcher-heading h1 { margin: 8px 0 18px; font: 700 clamp(3.4rem, 8vw, 7.4rem)/.88 var(--serif); letter-spacing: -.055em; }
.entry-intro > p:not(.eyebrow), .launcher-heading p:not(.eyebrow) { max-width: 640px; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.35rem); line-height: 1.6; }
.eyebrow { margin: 0; color: var(--accent-dark); font-size: .76rem; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; }
.privacy-note { display: grid; gap: 6px; max-width: 520px; margin-top: 42px; padding: 20px 22px; border-left: 4px solid var(--accent); background: rgba(255,255,255,.52); }
.privacy-note span { color: var(--muted); line-height: 1.45; }
body.platform-mode .privacy-note {
  border-left-width: 5px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 12px 30px rgba(30, 64, 110, .08);
}

.sign-in-card, .dialog-card {
  padding: clamp(26px, 4vw, 42px);
  border: 1px solid var(--line);
  background: rgba(255, 252, 247, .94);
  box-shadow: 0 28px 80px rgba(65, 38, 20, .13);
}
body.platform-mode .sign-in-card,
body.platform-mode .dialog-card {
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 28px 80px rgba(20, 41, 68, .11);
}
.card-heading { margin-bottom: 26px; }
.card-heading h2, .dialog-heading h2 { margin: 8px 0 0; font: 700 2rem/1.05 var(--serif); }
form { display: grid; gap: 18px; }
label { display: grid; gap: 8px; color: var(--muted); font-size: .82rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
input, select { width: 100%; min-height: 54px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: var(--paper-strong); }
input:focus, select:focus { outline: 3px solid rgba(198, 90, 44, .18); border-color: var(--accent); }
.primary-action { min-height: 54px; padding: 13px 20px; color: white; background: var(--accent); border-color: var(--accent); font-weight: 800; }
.primary-action:hover { background: var(--accent-dark); }
.alternative-actions { display: flex; justify-content: space-between; gap: 14px; margin-top: 20px; }
.text-action, .close-action { padding: 10px 12px; color: var(--accent-dark); background: transparent; font-weight: 700; }
.feedback { min-height: 1.25rem; color: var(--muted); line-height: 1.4; }
.feedback[data-tone="error"] { color: var(--danger); }
.feedback[data-tone="success"] { color: var(--success); }

.launcher-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 36px; margin-bottom: 44px; }
.launcher-heading h1 { font-size: clamp(3rem, 6vw, 6rem); }
.signed-in-person { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; }
.signed-in-person > span { width: 48px; height: 48px; background: var(--accent); font: 800 1rem var(--sans); }
.signed-in-person strong, .signed-in-person small { display: block; }
.signed-in-person small { margin-top: 3px; color: var(--muted); text-transform: capitalize; }
.workspace-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.platform-actions { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 22px; padding: 20px 22px; border: 1px solid rgba(198, 90, 44, .45); background: rgba(255, 252, 247, .88); }
.platform-actions[hidden] { display: none; }
.platform-actions strong, .platform-actions span { display: block; }
.platform-actions span { margin-top: 5px; color: var(--muted); }
.platform-actions .primary-action { min-height: auto; white-space: nowrap; text-decoration: none; }
body.platform-mode .platform-actions {
  border-color: rgba(31, 95, 166, .26);
  background:
    linear-gradient(135deg, rgba(255,255,255,.94), rgba(226, 237, 250, .92));
}
.workspace-card { min-height: 220px; display: flex; flex-direction: column; justify-content: space-between; padding: 28px; border: 1px solid var(--line); border-radius: 8px; color: inherit; background: rgba(255,252,247,.86); text-decoration: none; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.workspace-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 20px 45px rgba(70, 40, 23, .1); }
.workspace-number { color: var(--accent); font-weight: 800; letter-spacing: .15em; }
.workspace-card h2 { margin: 34px 0 10px; font: 700 2rem/1 var(--serif); }
.workspace-card p { margin: 0; color: var(--muted); line-height: 1.55; }
.workspace-card strong:last-child { margin-top: 22px; color: var(--accent-dark); }
body.platform-mode .workspace-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.94), rgba(241, 246, 252, .94));
  border-radius: 18px;
}
body.platform-mode .workspace-card:hover {
  box-shadow: 0 22px 48px rgba(28, 60, 97, .13);
}
.terminal-preference { display: flex; grid-template-columns: auto 1fr; align-items: center; gap: 12px; margin-top: 26px; text-transform: none; letter-spacing: 0; }
.terminal-preference input { width: 20px; min-height: 20px; }

footer { display: flex; justify-content: space-between; gap: 20px; padding: 20px clamp(24px, 5vw, 72px); color: var(--muted); border-top: 1px solid var(--line); font-size: .85rem; }

dialog { width: min(520px, calc(100% - 30px)); padding: 0; border: 0; background: transparent; }
dialog::backdrop { background: rgba(40, 21, 13, .52); backdrop-filter: blur(6px); }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 10px; }

@media (max-width: 800px) {
  .entry-stage { grid-template-columns: 1fr; gap: 38px; }
  .entry-intro h1 { font-size: clamp(3.6rem, 18vw, 6rem); }
  .privacy-note { margin-top: 24px; }
  .launcher-heading { align-items: flex-start; flex-direction: column; }
  .workspace-grid { grid-template-columns: 1fr; }
  .platform-actions { align-items: flex-start; flex-direction: column; }
  .entry-header { align-items: flex-start; }
  .customer-link { padding: 10px 12px; font-size: .85rem; }
  footer { flex-direction: column; }
}
