:root {
  color-scheme: light;
  font-family: Arial, "Noto Sans KR", system-ui, sans-serif;
  color: #16191d;
  background: #f4f5f5;
  line-height: 1.6;
  --ink: #111417;
  --muted: #687078;
  --line: #dfe3e5;
  --brand: #00a7b5;
  --brand-dark: #007d88;
  --brand-soft: #e6f7f8;
  --signal: #ef7622;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #f4f5f5; }
button, input, select { font: inherit; }

.skip-link { position: absolute; left: 1rem; top: -5rem; padding: .8rem 1rem; color: #fff; background: var(--ink); z-index: 20; }
.skip-link:focus { top: 1rem; }

.brand-header {
  min-height: 76px;
  padding: 0 clamp(1.25rem, 5vw, 5rem);
  display: flex;
  align-items: center;
  gap: 2rem;
  background: #fff;
  border-bottom: 1px solid #e6e8e9;
}

.brand-mark { color: #111; font-size: 1.65rem; font-weight: 300; letter-spacing: -.1em; text-decoration: none; white-space: nowrap; }
.brand-mark strong { color: var(--brand); font-size: 1.08em; font-weight: 800; }
.product-name { padding-left: 2rem; border-left: 1px solid var(--line); font-size: .78rem; font-weight: 800; letter-spacing: .2em; }
.product-name span { color: var(--brand-dark); }
.header-status { margin-left: auto; color: #6e7479; font-size: .66rem; font-weight: 700; letter-spacing: .12em; }
.header-status span { display: inline-block; width: 7px; height: 7px; margin-right: .45rem; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.session-summary { margin-left: auto; display: flex; align-items: center; gap: 1rem; color: #4b5257; font-size: .8rem; font-weight: 700; }
.text-button { padding: .45rem .7rem; color: var(--brand-dark); background: transparent; border: 1px solid #cfd5d7; cursor: pointer; }
.text-button:hover { color: #fff; background: var(--brand-dark); border-color: var(--brand-dark); }

.auth-view { width: min(1080px, calc(100% - 2rem)); min-height: calc(100vh - 76px); margin-inline: auto; padding: clamp(3rem, 7vw, 6rem) clamp(1.25rem, 5vw, 4rem); background: #fff; }
.auth-heading { max-width: 700px; margin: 0 auto 3rem; text-align: center; }
.auth-heading h1 { margin: .2rem 0 .6rem; font-size: clamp(2.3rem, 5vw, 4rem); line-height: 1; letter-spacing: -.055em; }
.auth-heading > p:last-child { margin: 0; color: var(--muted); }
.account-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.account-choice-card { display: flex; flex-direction: column; min-height: 500px; padding: clamp(1.75rem, 4vw, 2.7rem); border: 1px solid var(--line); background: #fff; }
.account-choice-card:hover { border-color: #aeb8bc; box-shadow: 0 18px 45px rgba(16, 25, 29, .08); }
.account-logo { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 1.8rem; border: 1px solid var(--line); border-radius: 50%; font-weight: 900; }
.google-logo { color: #4285f4; font-size: 1.65rem; }
.openai-logo { color: #fff; background: var(--ink); border-color: var(--ink); font-size: .9rem; letter-spacing: -.04em; }
.account-type { margin: 0; color: var(--brand-dark); font-size: .65rem; font-weight: 900; letter-spacing: .17em; }
.account-choice-card h2 { margin: .4rem 0 .8rem; font-size: clamp(1.55rem, 3vw, 2.15rem); letter-spacing: -.04em; }
.account-choice-card > p:not(.account-type) { margin: 0; color: var(--muted); }
.account-choice-card ul { display: grid; gap: .65rem; margin: 1.7rem 0 2rem; padding: 1.4rem 0 0; border-top: 1px solid var(--line); list-style: none; color: #394146; font-size: .88rem; }
.account-choice-card li::before { content: "✓"; margin-right: .65rem; color: var(--brand-dark); font-weight: 900; }
.provider-login-button { width: 100%; margin-top: auto; padding: 1rem; text-align: center; }
.secondary-provider-button { color: var(--ink); background: #fff; }
.account-guide-button { align-self: center; margin-top: 1rem; padding: .25rem; color: var(--brand-dark); border: 0; border-bottom: 1px solid currentColor; background: transparent; font-size: .78rem; font-weight: 800; cursor: pointer; }
.auth-security-note { margin: 1.5rem 0 0; color: var(--muted); text-align: center; font-size: .78rem; }
.auth-brand-panel { position: relative; overflow: hidden; padding: clamp(3rem, 7vw, 6rem); color: #fff; background: var(--ink); }
.auth-brand-panel::before, .auth-brand-panel::after { content: ""; position: absolute; border: 1px solid rgba(0,167,181,.35); border-radius: 50%; pointer-events: none; }
.auth-brand-panel::before { width: 420px; height: 420px; right: -210px; bottom: -80px; }
.auth-brand-panel::after { width: 260px; height: 260px; right: -110px; bottom: 0; }
.auth-brand-panel h1 { position: relative; margin: 0; font-size: clamp(3rem, 6vw, 5.7rem); line-height: .98; letter-spacing: -.06em; }
.auth-brand-panel h1 em { color: transparent; -webkit-text-stroke: 1px #8d969a; font-style: normal; }
.auth-brand-panel > p:not(.eyebrow) { position: relative; max-width: 34rem; margin-top: 2rem; color: #b9c0c3; font-size: 1.05rem; }
.auth-brand-panel .account-note { margin-top: 1rem !important; padding-left: 1rem; color: #8fdde2 !important; border-left: 2px solid var(--brand); font-size: .86rem !important; }
.preauth-guides { position: relative; display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 2rem; }
.preauth-guides p { flex-basis: 100%; margin: 0 0 .2rem; color: #dbe0e2; font-size: .86rem; }
.preauth-guide-button { padding: .7rem .85rem; color: #fff; border: 1px solid #4c585d; background: transparent; font-size: .76rem; font-weight: 800; cursor: pointer; }
.preauth-guide-button:hover, .preauth-guide-button:focus-visible { color: #071114; border-color: #61d9e1; background: #61d9e1; }
.auth-benefits { position: relative; display: grid; gap: .8rem; margin: 2.5rem 0 0; padding: 0; list-style: none; }
.auth-benefits li { padding: .85rem 0; color: #dbe0e2; border-bottom: 1px solid #30363a; }
.auth-benefits span { display: inline-block; width: 3rem; color: #59d7df; font-size: .7rem; font-weight: 800; letter-spacing: .12em; }
.auth-form-panel { padding: clamp(2rem, 6vw, 5rem); align-self: center; }
.auth-tabs { display: flex; margin-bottom: 3rem; border-bottom: 1px solid var(--line); }
.auth-tab { flex: 1; padding: .9rem; color: #747b80; background: transparent; border: 0; border-bottom: 3px solid transparent; font-weight: 800; cursor: pointer; }
.auth-tab.active { color: var(--ink); border-bottom-color: var(--brand); }
.auth-form { display: grid; grid-template-columns: 1fr; gap: .65rem; max-width: none; margin: 0; }
.auth-form h2 { margin: 0 0 1.5rem; font-size: clamp(1.8rem, 3vw, 2.35rem); letter-spacing: -.04em; word-break: keep-all; }
.auth-form label { padding: .55rem 0 0; }
.form-kicker { margin: 0 0 .25rem; color: var(--brand-dark); font-size: .68rem; font-weight: 900; letter-spacing: .18em; }
.auth-submit { width: 100%; margin-top: 1rem; padding: 1rem; }
.auth-help { margin: 0; color: var(--muted); font-size: .82rem; }
.auth-status { margin-top: 1rem; }

main { width: min(1180px, calc(100% - 2rem)); margin-inline: auto; padding-bottom: 7rem; }

.hero {
  position: relative;
  min-height: 520px;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  align-items: center;
  overflow: hidden;
  margin-bottom: 6rem;
  color: #fff;
  background: var(--ink);
}

.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 45%, rgba(0,167,181,.12)); pointer-events: none; }
.hero-copy { position: relative; z-index: 2; padding: clamp(2.5rem, 7vw, 6rem); }
.eyebrow { margin: 0 0 1.5rem; color: #61d9e1; font-size: .7rem; font-weight: 800; letter-spacing: .22em; }
.hero h1 { margin: 0; font-size: clamp(3rem, 7vw, 6.5rem); line-height: .95; letter-spacing: -.06em; font-weight: 800; }
.hero h1 em { color: transparent; -webkit-text-stroke: 1px #99a1a5; font-style: normal; font-weight: 500; }
.hero-description { max-width: 38rem; margin: 2rem 0 0; color: #bec4c7; font-size: clamp(1rem, 2vw, 1.18rem); }

.hero-graphic { position: relative; min-height: 440px; }
.orbit { position: absolute; border: 1px solid rgba(255,255,255,.23); border-radius: 50%; }
.orbit-one { width: 330px; height: 330px; top: 50%; left: 45%; transform: translate(-50%,-50%); }
.orbit-two { width: 220px; height: 220px; top: 50%; left: 45%; transform: translate(-50%,-50%) rotate(35deg); border-color: rgba(0,167,181,.55); }
.core-mark { position: absolute; top: 50%; left: 45%; width: 110px; height: 110px; transform: translate(-50%,-50%); display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--brand); font-size: 3rem; font-weight: 200; box-shadow: 0 0 70px rgba(0,167,181,.45); }
.node { position: absolute; width: 12px; height: 12px; border: 3px solid var(--ink); border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 1px var(--signal); }
.node-one { top: 18%; left: 28%; }.node-two { right: 18%; top: 46%; }.node-three { left: 28%; bottom: 18%; background: #fff; box-shadow: 0 0 0 1px #fff; }

.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin: 0 0 2rem; padding-bottom: 1.5rem; border-bottom: 2px solid var(--ink); }
.section-heading p { margin: 0; color: var(--brand-dark); font-size: .72rem; font-weight: 800; letter-spacing: .2em; }
.section-heading h2 { margin: 0; font-size: clamp(1.75rem, 4vw, 3rem); letter-spacing: -.045em; }

.panel { display: grid; grid-template-columns: 110px 1fr; gap: 2.5rem; margin-bottom: 1px; padding: clamp(1.75rem, 5vw, 4rem); background: #fff; border: 0; }
.panel-icon { width: 78px; height: 78px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: #fff; }
.panel-icon svg { width: 40px; height: 40px; fill: none; stroke: var(--brand-dark); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.panel-content { min-width: 0; }
.panel h3 { margin: .3rem 0 .5rem; font-size: clamp(1.45rem, 3vw, 2.25rem); line-height: 1.2; letter-spacing: -.035em; }
.panel-content > p { color: var(--muted); }
.muted-panel { background: #edf1f1; }
.step-label { color: var(--brand-dark); font-size: .66rem; font-weight: 900; letter-spacing: .2em; }

.provider-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .8rem; margin-top: 1.5rem; }
.provider-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; min-height: 180px; padding: 1.5rem; overflow: hidden; border: 1px solid var(--line); background: #fafbfb; transition: border-color .2s, transform .2s; }
.provider-card:hover { transform: translateY(-3px); border-color: var(--brand); }
.provider-card::after { content: "01—06"; position: absolute; top: 1rem; right: 1.1rem; color: var(--brand-dark); font-size: .68rem; font-weight: 900; letter-spacing: .12em; }
.provider-card h3 { margin: 0; font-size: 1.2rem; }
.provider-card p { margin: 0 0 auto; color: var(--muted); font-size: .9rem; }

.button { display: inline-block; padding: .75rem 1.15rem; color: #fff; background: var(--ink); border: 1px solid var(--ink); border-radius: 0; font-weight: 750; font-size: .86rem; text-decoration: none; cursor: pointer; transition: background .2s, border-color .2s; }
.button:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.button:focus-visible, a:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; }
.status { min-height: 1.6em; color: var(--brand-dark) !important; font-weight: 750; }

#credential-form { display: grid; grid-template-columns: 1fr 2fr; gap: .65rem 1.5rem; max-width: 780px; margin-top: 1.75rem; }
label { padding-top: .7rem; font-weight: 750; }
input, select { width: 100%; padding: .8rem .9rem; border: 1px solid #aeb6bb; border-radius: 0; color: var(--ink); background: #fff; }
input:focus, select:focus { outline: 3px solid rgba(0,167,181,.25); border-color: var(--brand-dark); }
.field-help { grid-column: 2; margin: 0 0 .6rem; color: var(--muted) !important; font-size: .84rem; }
#credential-form .button { grid-column: 2; justify-self: start; }
code { padding: .15rem .35rem; color: #005f67; background: var(--brand-soft); }

.security-note { margin-top: 1.5rem; padding: 1rem 1.2rem; color: #3d484c !important; border-left: 3px solid var(--brand); background: #fff; }
.credential-list { display: grid; gap: .65rem; margin-top: 1.5rem; }
.credential-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.25rem; background: #fff; border-left: 3px solid var(--brand); }
.credential-row p { margin: 0; color: var(--muted); font-size: .88rem; }
.credential-row.invalid { border-left-color: #a52b24; }
.credential-info { flex: 1; }
.credential-meta { margin-top: .3rem !important; font-size: .76rem !important; }
.credential-actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.secondary-button { color: var(--ink); background: #fff; border-color: #b9bec1; }
.secondary-button:hover { color: #fff; background: var(--brand-dark); border-color: var(--brand-dark); }
.credential-editor { flex-basis: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; width: 100%; padding-top: 1rem; border-top: 1px solid var(--line); }
.credential-editor label { font-size: .78rem; }
.credential-editor .editor-actions { grid-column: 1 / -1; display: flex; gap: .5rem; }
.danger-button { color: #a52b24; background: #fff; border-color: #b9bec1; }
.danger-button:hover { color: #fff; background: #a52b24; border-color: #a52b24; }
.device-link-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; margin: 1.5rem 0 .5rem; }
.link-code-output { min-width: 9rem; color: var(--brand-dark); font-size: 2rem; font-weight: 900; letter-spacing: .18em; }
.usage-cards { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .75rem; margin: 1.5rem 0 2rem; }
.usage-card { padding: 1.1rem; border: 1px solid var(--line); background: #f7f9f9; }
.usage-card strong { display: block; font-size: 1.7rem; line-height: 1.2; }
.usage-card span { color: var(--muted); font-size: .78rem; }
.device-list { display: grid; gap: .6rem; }
.device-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem; border-left: 3px solid var(--brand); background: #f7f9f9; }
.device-row.revoked { border-left-color: #a52b24; opacity: .72; }
.device-row p { margin: .2rem 0 0; color: var(--muted); font-size: .8rem; }
.device-identifier { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem .55rem; margin-top: .45rem; color: var(--muted); font-size: .75rem; }
.device-identifier span { font-weight: 750; color: var(--ink); }
.device-identifier code { padding: .2rem .35rem; border: 1px solid #d9dfe1; background: #fff; color: #334247; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.device-id-copy { padding: .2rem .45rem; border: 1px solid #b9bec1; background: #fff; color: var(--brand-dark); font-size: .72rem; font-weight: 750; cursor: pointer; }
.device-id-copy:hover { color: #fff; border-color: var(--brand-dark); background: var(--brand-dark); }

.setup-wizard { width: min(760px, calc(100% - 2rem)); max-height: calc(100vh - 2rem); padding: 0; border: 0; color: var(--ink); background: #fff; box-shadow: 0 30px 90px rgba(0,0,0,.35); }
.setup-wizard::backdrop { background: rgba(10,13,15,.78); backdrop-filter: blur(3px); }
.wizard-shell { min-height: 580px; display: flex; flex-direction: column; padding: clamp(1.5rem, 5vw, 3.5rem); }
.wizard-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 2rem; }
.wizard-header h2 { margin: .2rem 0 1rem; font-size: clamp(1.7rem, 4vw, 2.7rem); line-height: 1.15; letter-spacing: -.04em; }
.wizard-close { width: 42px; height: 42px; flex: 0 0 auto; padding: 0; border: 1px solid var(--line); color: #51585d; background: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.wizard-close:hover { color: #fff; background: var(--ink); }
.wizard-progress { height: 4px; overflow: hidden; background: #e5e9ea; }
.wizard-progress span { display: block; height: 100%; background: var(--brand); transition: width .25s ease; }
.wizard-step-count { margin: .75rem 0 0; color: var(--brand-dark); font-size: .72rem; font-weight: 900; letter-spacing: .15em; }
.wizard-content { flex: 1; padding: 1.4rem 0; }
.wizard-description { margin: 0 0 1.25rem; color: #41494e; font-size: 1.02rem; }
.wizard-checklist { display: grid; gap: .65rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.wizard-checklist li { display: flex; gap: .7rem; padding: .75rem 1rem; background: #f2f5f5; }
.wizard-checklist span { color: var(--brand-dark); font-weight: 900; }
.wizard-external-link { margin-top: .25rem; }
.wizard-privacy { margin: 0; padding: 1rem 1.1rem; color: #434b50; border-left: 3px solid var(--signal); background: #fff6ef; font-size: .82rem; }
.wizard-privacy strong { display: block; color: #a64a0b; }
.wizard-actions { display: flex; justify-content: space-between; gap: 1rem; padding: 1.5rem 0 0; color: inherit; background: transparent; }
.wizard-actions button:disabled { opacity: .4; cursor: not-allowed; }

footer { display: flex; align-items: center; gap: 2rem; padding: 3rem clamp(1.25rem, 5vw, 5rem); color: #aeb4b7; background: var(--ink); font-size: .78rem; }
.footer-mark { color: #fff; margin-right: auto; }
footer p { margin: 0; }

@media (max-width: 760px) {
  .brand-header { min-height: 64px; gap: 1rem; }
  .product-name { padding-left: 1rem; }
  .header-status { display: none; }
  .session-summary { font-size: .72rem; }
  .auth-view { min-height: auto; }
  .account-choice-grid { grid-template-columns: 1fr; }
  .account-choice-card { min-height: 440px; }
  .auth-brand-panel { padding: 3rem 2rem; }
  .auth-brand-panel h1 { font-size: clamp(2.8rem, 14vw, 4.5rem); }
  .auth-benefits { margin-top: 2.5rem; }
  .auth-form-panel { padding: 2.5rem 2rem 4rem; }
  .hero { min-height: auto; grid-template-columns: 1fr; }
  .hero-graphic { min-height: 280px; order: -1; transform: scale(.72); margin: -2rem 0; }
  .hero-copy { padding-top: 2rem; }
  .panel { grid-template-columns: 1fr; gap: 1rem; }
  .panel-icon { width: 58px; height: 58px; }
  .panel-icon svg { width: 30px; height: 30px; }
  #credential-form { grid-template-columns: 1fr; }
  .field-help, #credential-form .button { grid-column: 1; }
  label { padding-top: .35rem; }
  .credential-row { align-items: stretch; flex-direction: column; }
  .credential-editor { grid-template-columns: 1fr; }
  .usage-cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .device-row { align-items: stretch; flex-direction: column; }
  .wizard-shell { min-height: calc(100vh - 2rem); }
  .wizard-actions { align-items: stretch; flex-direction: row; }
  .wizard-actions .button { flex: 1; }
  footer { align-items: flex-start; flex-direction: column; gap: .75rem; }
}

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