:root {
  color-scheme: light;
  --paper: #f4f7fc;
  --surface: #ffffff;
  --ink: #182a44;
  --muted: #4a5c75;
  --line: #d8e2f0;
  --accent: #2867ca;
  font: 16px/1.6 "Instrument Sans", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); }
a { color: inherit; text-underline-offset: .22em; }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #2867ca; outline-offset: 3px; }
.skip { position: absolute; transform: translateY(-150%); background: var(--surface); padding: .6rem; }
.skip:focus { transform: none; z-index: 1; }
.topbar {
  max-width: 1220px; margin: auto; padding: 1.15rem clamp(1rem, 4vw, 3rem);
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
}
.brand { display: inline-flex; align-items: center; gap: .6rem; font-size: 1.13rem; font-weight: 750; text-decoration: none; }
.brand img { object-fit: contain; }
.back { font-size: .87rem; font-weight: 650; color: var(--muted); }
.account {
  width: min(32rem, calc(100% - 2rem)); margin: clamp(1rem, 5vh, 3rem) auto 4rem;
  border: 1px solid var(--line); background: var(--surface); border-radius: 24px;
  overflow: clip; box-shadow: 0 18px 70px #223a6110;
}
.intro { padding: clamp(1.15rem, 5vw, 2rem) clamp(1.15rem, 5vw, 2rem) .5rem; }
.staff {
  display: flex; align-items: center; justify-content: space-around;
  min-height: 6rem; color: #d8e7ff; padding-inline: .5rem;
  background: repeating-linear-gradient(to bottom, #b8d2ff60 0 1px, transparent 1px 15px) center / 100% 61px no-repeat;
}
.staff span:first-child { font: 4.8rem/1 "STIX Two Text", "Times New Roman", serif; }
.staff span:not(:first-child) { font: 2rem/1 Georgia, serif; }
.staff span:nth-child(3) { transform: translateY(-14px); }
.staff span:last-child { transform: translateY(-29px); }
.eyebrow { font-size: .74rem; font-weight: 740; letter-spacing: .18em; color: #c8ddff; margin: 0; }
h1, h2, h3, p { margin: 0; }
h1 { margin-top: .35rem; font-size: clamp(1.42rem, 4.5vw, 1.85rem); line-height: 1.18; letter-spacing: -.025em; }
#subtitle { color: var(--muted); margin-top: .5rem; max-width: 27rem; }
#subtitle:empty { display: none; }
.details { padding: .5rem clamp(1.15rem, 5vw, 2rem) clamp(1.15rem, 5vw, 2rem); min-width: 0; }
.tabs { display: flex; flex-wrap: wrap; gap: .2rem .55rem; border-bottom: 1px solid var(--line); margin-bottom: 2rem; }
.tabs a { display: inline-flex; align-items: center; min-height: 44px; padding: .55rem .36rem; font-size: .83rem; font-weight: 650; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; }
.tabs a[aria-current] { border-color: var(--accent); color: var(--ink); }
.tabs a:hover, .text-link:hover { color: #235cb4; }
h2 { font-size: clamp(1.28rem, 3vw, 1.65rem); line-height: 1.24; letter-spacing: -.035em; }
h3 { font-size: 1rem; line-height: 1.4; }
.details section > p, #privacy p, #delete-dialog p { margin-top: .7rem; }
.muted, .fine { color: var(--muted); }
.fine { font-size: .85rem; }
.primary, .secondary {
  border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center;
  gap: .75rem; min-height: 44px; padding: .62rem 1rem; border-radius: 9px; font-weight: 690;
}
.primary { background: var(--accent); color: white; }
.primary:hover:enabled { background: #1d55ad; }
button:disabled { opacity: .63; cursor: default; }
.secondary { background: transparent; border-color: var(--line); color: var(--ink); }
.secondary:hover { background: #ebf2fd; }
.danger { color: #922b27; }
#guest form { margin: 1.35rem 0 .75rem; }
#invite-save > p { margin: 0 0 .85rem; }
#invite-save > p:last-child { margin: .75rem 0 0; font-size: .9rem; }
.auth-switch { margin-top: 1.1rem; }
.account-menu { display: grid; gap: .3rem; padding-top: .35rem; }
.account-menu a, .account-menu button {
  display: flex; align-items: center; min-height: 44px; padding: .45rem .7rem;
  border: 1px solid var(--line); border-radius: 8px; background: transparent;
  color: var(--ink); text-align: left; text-decoration: none; font-weight: 650;
}
.account-menu a:hover, .account-menu button:hover { background: #edf4ff; }
.code-destination { color: var(--muted); margin-bottom: .9rem; overflow-wrap: anywhere; }
[data-google] { width: min(100%, 22rem); justify-content: space-between; }
.text-link { display: inline-block; font-size: .9rem; font-weight: 650; margin-top: 1.4rem; }
.notice { border-left: 3px solid #4476bf; background: #edf4ff; padding: .65rem .85rem; margin-bottom: 1.15rem; border-radius: 4px; font-size: .9rem; }
.facts { margin: 1rem 0; }
.facts div { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .15rem 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.facts dt, #profile-form label { font-weight: 650; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.field { display: flex; gap: .5rem; margin: .45rem 0 1.2rem; }
.field input { min-width: 0; flex: 1; border: 1px solid #879bb7; border-radius: 9px; padding: .6rem .75rem; color: var(--ink); background: white; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .85rem; }
#privacy-controls { margin-top: 1.35rem; }
.plan-list { display: grid; gap: .65rem; margin-top: 1.05rem; }
.plan-list article { border: 1px solid var(--line); border-radius: 11px; padding: .8rem 1rem; }
.plan-list article div { display: flex; justify-content: space-between; align-items: center; gap: .4rem; }
.plan-list p { color: var(--muted); font-size: .88rem; margin: .4rem 0 .1rem; }
.plan-list a { font-size: .85rem; font-weight: 700; }
.badge { font-size: .72rem; white-space: nowrap; padding: .16rem .45rem; border-radius: 4px; background: #eef2f8; }
.badge.active { background: #deebff; }
dialog { padding: 1.5rem; width: min(28rem, calc(100% - 2rem)); border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); }
dialog::backdrop { background: #192b47a3; }
@media (max-width: 720px) {
  .account { border-radius: 16px; margin-top: .5rem; }
  .staff { min-height: 3rem; max-width: 15rem; background-size: 100% 41px; background-image: repeating-linear-gradient(to bottom, #b8d2ff60 0 1px, transparent 1px 10px); }
  .staff span:first-child { font-size: 3rem; }
  .staff span:not(:first-child) { font-size: 1.3rem; transform: none; }
  .tabs { margin-bottom: 1.35rem; }
}

.embedded-account .account {
  display: block;
  width: 100%;
  min-height: 0;
  margin: 0;
  box-shadow: none;
  border: 0;
  border-radius: 0;
}
.embedded-account .intro { padding-top: .8rem; padding-right: 3.5rem; }
.embedded-account .skip, .embedded-account > footer { display: none; }
.embedded-dark {
  color-scheme: dark;
  --paper: #202020;
  --surface: #202020;
  --ink: #f1f1f1;
  --muted: #bbb;
  --line: #585858;
  --accent: #346fc5;
}
.embedded-dark .field input, .embedded-dark .notice { background: #2b2b2b; }
.embedded-dark .secondary:hover, .embedded-dark .account-menu :is(button,a):hover { background: #353535; }
.embedded-dark .google-button:hover { background: #fff; }
.embedded-account #guest form { margin: .75rem 0; }
.embedded-account .field { margin-bottom: .65rem; }
.embedded-account #guest .auth-terms { margin: .75rem 0; }

.embedded-account .details { padding: .5rem clamp(1rem, 5vw, 2rem) 1.5rem; }
.embedded-account .tabs { margin-bottom: 1rem; }
.embedded-account #profile h2 { display: none; }

.or-divider { margin: 14px 0 8px; text-align: center; }
.apple-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 44px;
  border: 1px solid #737373; border-radius: 9px; background: #000; color: #fff; font: 600 15px -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; cursor: pointer; }
.apple-button:hover { background: #1f1f1f; }
.embedded-dark .apple-button { background: #fff; color: #000; }
.embedded-dark .apple-button:hover { background: #e9e9e9; }
@media (prefers-color-scheme: dark) {
  body:not(.embedded-account) .apple-button { background: #fff; color: #000; }
  body:not(.embedded-account) .apple-button:hover { background: #e9e9e9; }
}

/* The mark is from Google's official Sign in with Google assets (Android + Web, 4x). */
.google-button {
  width: 100%; min-height: 44px; gap: 10px; padding: 0 12px;
  background: #fff; border-color: #747775; color: #1f1f1f;
  font: 500 14px/20px "Google Sans", system-ui, sans-serif;
}
.google-button:hover { background: #fff; box-shadow: inset 0 0 0 1px #747775; }
.google-button img { flex: none; }
#google-form:not([hidden]) + #apple-form:not([hidden]) { margin-top: 8px; }

.site-footer { margin: 1.5rem auto; padding: 0 1rem; text-align: center; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1rem; font-size: .85rem; color: var(--muted); }

#survey-questions label { display: grid; gap: .3rem; margin-block: .7rem; }
#survey-questions select { width: 100%; padding: .5rem; border: 1px solid currentColor; border-radius: .4rem; background: Canvas; color: CanvasText; font: inherit; }

#password-login, #password-setup { margin-block: .9rem; }
#password-login > summary, #password-setup > summary { cursor: pointer; }
#password-login form { margin-top: .75rem; }
