/* The cloud account plane's stylesheet.
 *
 * One source of style for every customer page. The look is the product page's:
 * warm paper, white cards, one green accent, one warn and one bad colour. No
 * framework, no build step, no inline style: the shell links this file, and
 * the deploy CSP keeps style-src 'self'.
 *
 * Tokens: paper #f6f3ee, card #ffffff, ink #1f1c18, muted #6b645b, line
 * #e7e1d7, accent #17604f, warn #8f560c on #fdf2e0, bad #a5342c on #fbebe9.
 * Type: 14px/1.55 system stack, headings 650, five sizes 28/20/16/14/12.
 * Shape: cards radius 16, controls 12, pills 999, borders 1px.
 * Focus: 3px rgba(23,96,79,.12) ring over a 2px accent outline.
 * Motion: the reduced-motion block at the end turns it off.
 */

:root {
  color-scheme: light;
  --paper: #f6f3ee;
  --card: #ffffff;
  --ink: #1f1c18;
  --muted: #6b645b;
  --faint: #948b7f;
  --line: #e7e1d7;
  --line2: #d8d0c4;
  --accent: #17604f;
  --accent-ink: #0d3d32;
  --accent-soft: #e6f0ec;
  --accent-line: #cfe2da;
  --warn: #8f560c;
  --warn-soft: #fdf2e0;
  --warn-line: #ecd3a8;
  --bad: #a5342c;
  --bad-soft: #fbebe9;
  --bad-line: #ecccca;
  --good: #2f6b45;
  --shadow: 0 1px 2px rgba(31, 28, 24, 0.04), 0 8px 24px rgba(31, 28, 24, 0.05);
  --radius: 16px;
  --control: 12px;
  --pill: 999px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui,
    "Helvetica Neue", Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 650;
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 20px;
}

h3 {
  font-size: 16px;
}

p {
  margin: 0;
}

p + p {
  margin-top: 10px;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

a:hover {
  text-decoration-thickness: 0.12em;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(23, 96, 79, 0.12);
  border-radius: 6px;
}

[hidden] {
  display: none !important;
}

.wrap {
  width: min(1120px, 100% - 48px);
  margin: 0 auto;
  padding-bottom: 48px;
}

/* ------------------------------------------------------------- skip link */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 var(--control) 0;
  text-decoration: none;
}

.skip:focus {
  left: 0;
}

/* ------------------------------------------------------------- site header */

header.site {
  padding: 22px 0 0;
}

header.site .bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-bottom: 16px;
}

.brand {
  font-weight: 650;
  font-size: 19px;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
  margin-right: 10px;
}

.brand:hover {
  color: var(--accent-ink);
}

.identity {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
}

.mt {
  margin-top: 12px;
}

.mt-0 {
  margin-top: 0;
}

.who {
  color: var(--muted);
  font-size: 12px;
}

nav.mainnav {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}

nav.mainnav ul,
nav.lang ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
}

nav.mainnav a {
  display: inline-block;
  padding: 6px 12px;
  border-radius: var(--pill);
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

nav.mainnav a:hover {
  background: #efeae1;
  color: var(--ink);
}

nav.mainnav a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent-ink);
  box-shadow: inset 0 0 0 1px var(--accent-line);
}

nav.lang {
  margin-left: auto;
}

nav.lang ul {
  gap: 2px;
  background: #efeae1;
  border-radius: var(--pill);
  padding: 2px;
}

nav.lang a {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--pill);
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}

nav.lang a[aria-current="true"] {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(31, 28, 24, 0.08);
}

/* ------------------------------------------------------------- main */

main#main {
  padding: 26px 0 8px;
}

.pagehead {
  margin: 0 0 18px;
}

.pagehead h1 {
  max-width: 30ch;
}

.intro,
.lede {
  color: var(--muted);
  font-size: 16px;
  max-width: 68ch;
  margin-top: 8px;
}

.kicker {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-radius: var(--pill);
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}

.note,
.muted {
  color: var(--muted);
}

.note {
  font-size: 12px;
  margin-bottom: 8px;
}

.card > .note:last-child {
  margin-bottom: 0;
}

.small {
  font-size: 12px;
}

.stack > * + * {
  margin-top: 16px;
}

/* ------------------------------------------------------------- notices */

.notice,
.error,
.draft,
.warning {
  border-radius: var(--control);
  padding: 12px 14px;
  margin: 0 0 16px;
  border: 1px solid;
  font-size: 14px;
}

.notice {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent-ink);
}

.error {
  background: var(--bad-soft);
  border-color: var(--bad-line);
  color: var(--bad);
}

.draft,
.warning {
  background: var(--warn-soft);
  border-color: var(--warn-line);
  color: var(--warn);
}

.draft {
  font-weight: 650;
}

/* ------------------------------------------------------------- cards */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin: 0;
}

.card + .card {
  margin-top: 16px;
}

.card > h2 {
  margin-bottom: 6px;
}

.card > h2 + p,
.card > h2 + .muted {
  margin-bottom: 12px;
}

.card > h2 + dl,
.card > h2 + table,
.card > h2 + form,
.card > h2 + .table-wrap {
  margin-top: 12px;
}

.card.danger {
  border-color: var(--bad-line);
}

.card.danger h2 {
  color: var(--bad);
}

.card.flush {
  padding: 0;
  overflow: hidden;
}

.card-pad {
  padding: 22px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dash {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.85fr);
  gap: 16px;
  align-items: start;
}

.dash-main > * + *,
.dash-side > * + * {
  margin-top: 16px;
}

.dash-main .card,
.dash-side .card {
  margin-top: 0;
}

/* ------------------------------------------------------------- buttons */

.btn,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: var(--control);
  padding: 9px 15px;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn:hover,
button:hover {
  background: #12513f;
  border-color: #12513f;
}

.btn:active,
button:active {
  transform: translateY(1px);
}

.btn {
  background: #fff;
  border-color: var(--line2);
  color: var(--ink);
}

.btn:hover {
  background: #fbf9f5;
  border-color: var(--line2);
}

.btn.pri {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn.pri:hover {
  background: #12513f;
}

.btn.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}

.btn.ghost:hover {
  background: #efeae1;
  color: var(--ink);
}

.btn.danger {
  background: #fff;
  border-color: var(--bad-line);
  color: var(--bad);
}

.btn.danger:hover {
  background: var(--bad-soft);
}

.btn.small,
button.small {
  padding: 6px 11px;
  font-size: 12px;
  border-radius: 10px;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

form.inline {
  display: inline;
}

/* ------------------------------------------------------------- forms */

label {
  display: block;
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.field {
  margin: 0 0 14px;
}

input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  width: 100%;
  max-width: 100%;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line2);
  border-radius: var(--control);
  padding: 10px 13px;
  font: inherit;
  min-height: 42px;
}

input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--accent);
}

input[type="checkbox"],
input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  margin: 0;
}

.hint {
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line2);
  border-radius: var(--pill);
  padding: 7px 14px;
  background: #fff;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin: 0;
  text-decoration: none;
}

.choice:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
}

.choice:has(input:checked) {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent-ink);
}

.choice input {
  margin: 0;
}

fieldset {
  border: 0;
  margin: 0 0 14px;
  padding: 0;
}

legend {
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  margin-bottom: 8px;
  padding: 0;
}

/* ------------------------------------------------------------- auth */

.auth {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: 40px;
  align-items: start;
  max-width: 980px;
  margin: 8px auto 0;
}

.auth.narrow {
  grid-template-columns: minmax(0, 460px);
  justify-content: center;
}

.auth-aside {
  padding-top: 8px;
}

.auth-aside h2 {
  font-size: 20px;
  margin-bottom: 10px;
}

.auth-aside .intro {
  margin-top: 0;
}

.auth-card {
  padding: 26px;
}

.auth-card > .intro {
  margin-bottom: 16px;
}

.auth-card .btn,
.auth-card button[type="submit"] {
  width: 100%;
  padding: 11px 16px;
}

.auth-foot {
  margin-top: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--faint);
  font-size: 12px;
  margin: 20px 0 14px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.oauth-row {
  display: grid;
  gap: 8px;
}

.oauth-row .btn {
  width: 100%;
  justify-content: center;
}

.checks {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}

.checks li {
  position: relative;
  padding-left: 27px;
  margin: 10px 0;
  color: var(--muted);
}

.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-line);
}

.checks li::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 7px;
  width: 7px;
  height: 4px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

/* ------------------------------------------------------------- pills and stats */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--pill);
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 650;
  background: #efeae1;
  color: var(--muted);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.pill.good {
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-color: var(--accent-line);
}

.pill.warn {
  background: var(--warn-soft);
  color: var(--warn);
  border-color: var(--warn-line);
}

.pill.bad {
  background: var(--bad-soft);
  color: var(--bad);
  border-color: var(--bad-line);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.stat {
  background: #fbf9f5;
  border: 1px solid var(--line);
  border-radius: var(--control);
  padding: 12px 14px;
}

.stat .label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.stat .value {
  display: block;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin-top: 2px;
}

meter,
progress {
  display: block;
  width: 100%;
  height: 10px;
  margin: 10px 0;
  appearance: none;
  border: 0;
  border-radius: var(--pill);
  background: #efeae1;
  overflow: hidden;
}

meter::-webkit-meter-bar,
progress::-webkit-progress-bar {
  background: #efeae1;
  border-radius: var(--pill);
}

meter::-webkit-meter-optimum-value,
progress::-webkit-progress-value {
  background: var(--accent);
  border-radius: var(--pill);
}

meter::-moz-meter-bar,
progress::-moz-progress-bar {
  background: var(--accent);
  border-radius: var(--pill);
}

/* ------------------------------------------------------------- definition lists */

dl {
  margin: 0;
}

dl.plan,
dl.dl-grid {
  display: grid;
  grid-template-columns: minmax(130px, max-content) minmax(0, 1fr);
  gap: 8px 20px;
  align-items: baseline;
}

dl.plan dt,
dl.dl-grid dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

dl.plan dd,
dl.dl-grid dd {
  margin: 0;
  font-size: 14px;
  overflow-wrap: anywhere;
}

dl.identity dd {
  margin: 0 0 4px;
  overflow-wrap: anywhere;
}

dl.identity dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

/* ------------------------------------------------------------- tables */

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

caption {
  text-align: left;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  padding: 0 0 8px;
}

th {
  text-align: left;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.02em;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line2);
  white-space: nowrap;
}

td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: #fbf9f5;
}

code,
.code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  background: #f4f0e8;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 5px;
  overflow-wrap: anywhere;
}

.token {
  display: block;
  padding: 12px 14px;
  margin: 10px 0;
  background: #f4f0e8;
  border: 1px solid var(--line2);
  border-radius: var(--control);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.token code {
  background: none;
  border: 0;
  padding: 0;
  font-size: 12px;
}

/* ------------------------------------------------------------- lists and workspace rows */

.plain {
  list-style: none;
  margin: 0;
  padding: 0;
}

.plain li {
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.plain li:first-child {
  border-top: 0;
  padding-top: 0;
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}

.credential {
  border: 1px solid var(--line);
  border-radius: var(--control);
  padding: 12px 14px;
  margin-top: 10px;
  background: #fbf9f5;
}

.credential .row {
  margin-top: 6px;
}

/* ------------------------------------------------------------- footer */

footer.site {
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding-top: 18px;
  color: var(--muted);
  font-size: 12px;
}

footer.site ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 8px 0 0;
  padding: 0;
}

footer.site a {
  color: var(--muted);
}

pre.legal {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 14px/1.6 ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin: 16px 0 0;
}

/* ------------------------------------------------------------- landing */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 32px;
  align-items: start;
  margin: 4px 0 24px;
}

.hero-solo {
  max-width: 720px;
  margin: 4px 0 26px;
}

.hero-solo .lead {
  font-size: 16px;
  color: var(--muted);
  max-width: 64ch;
}

.hero h1 {
  font-size: 28px;
  margin-bottom: 12px;
}

.hero .lead {
  font-size: 16px;
  color: var(--muted);
  max-width: 56ch;
}

.hero-art {
  background: linear-gradient(160deg, #fff 0%, #fbf8f2 60%, #f1ece2 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.art-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--control);
  padding: 14px 16px;
}

.art-card + .art-card {
  margin-top: 10px;
}

.art-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--good);
  flex: none;
}

.dot.amber {
  background: var(--warn);
}

.art-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
  margin-top: 4px;
}

.art-line:first-of-type {
  border-top: 0;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.landing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.landing-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.landing-grid .card h2 {
  font-size: 16px;
  margin-bottom: 8px;
}

.landing-grid ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.landing-grid li + li {
  margin-top: 6px;
}

.footnote {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
}

/* ------------------------------------------------------------- account */

.session-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.session-line:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.danger-links {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.danger-links a {
  color: var(--bad);
  font-weight: 600;
}

/* ------------------------------------------------------------- responsive */

@media (max-width: 900px) {
  .wrap {
    width: min(1120px, 100% - 32px);
  }

  .auth {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    max-width: 560px;
  }

  .auth-aside {
    padding-top: 0;
    order: 2;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .landing-grid,
  .landing-grid.two,
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }

  .dash {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  body {
    font-size: 14px;
  }

  .wrap {
    width: min(1120px, 100% - 24px);
  }

  header.site {
    padding-top: 16px;
  }

  header.site .bar {
    display: block;
    padding-bottom: 12px;
  }

  nav.lang {
    margin: 10px 0 0;
  }

  nav.mainnav {
    margin: 0 -12px;
    padding: 6px 8px;
  }

  nav.mainnav ul {
    flex-wrap: wrap;
  }

  main#main {
    padding-top: 20px;
  }

  h1 {
    font-size: 28px;
  }

  .card,
  .card-pad,
  .auth-card {
    padding: 18px;
    border-radius: 14px;
  }

  dl.plan,
  dl.dl-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  dl.plan dt,
  dl.dl-grid dt {
    margin-top: 8px;
  }

  .auth-card .btn,
  .auth-card button[type="submit"] {
    width: 100%;
  }

  footer.site {
    margin-top: 28px;
  }
}

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