:root {
  color-scheme: light;
  --surface: #fff;
  --background: #f4f6f4;
  --ink: #17201b;
  --muted: #54645c;
  --line: #d4ddd6;
  --primary: #176c4f;
  --primary-dark: #104e39;
  --error: #a32f28;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  color: var(--ink);
  background: var(--background);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; }
h1, h2, p, dl, dd { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
button:focus-visible, input:focus-visible, a:focus-visible {
  outline: 3px solid #368568;
  outline-offset: 3px;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.site-name { font-size: 15px; font-weight: 750; }

.layout { padding: 68px 20px 40px; }
.activation {
  max-width: 456px;
  margin: 0 auto;
  padding: 30px;
  display: grid;
  gap: 23px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.product { display: flex; align-items: center; gap: 13px; }
.product img { display: block; flex: 0 0 48px; }
h1 { font-size: 30px; font-weight: 780; line-height: 1.14; }
h2 { font-size: 18px; font-weight: 730; line-height: 1.35; overflow-wrap: anywhere; }
.product-plan { margin-top: 3px; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }

form, .result, .handoff { display: grid; gap: 14px; }
#code-form { gap: 10px; }
.field { display: grid; gap: 6px; }
.copy-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
label { font-size: 14px; font-weight: 680; }
input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f9faf9;
  color: var(--ink);
  font-size: 16px;
}
input::placeholder { color: #66736b; }
input[aria-invalid="true"] { border-color: var(--error); }
input[readonly] { color: var(--muted); }
.primary, .secondary {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 15px;
  font-weight: 680;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.primary { width: 100%; background: var(--primary); color: #fff; }
.primary:hover:not(:disabled) { background: var(--primary-dark); }
.primary:disabled { background: #dce9e0; color: #46594d; }
.secondary { background: var(--surface); color: var(--primary-dark); border-color: var(--line); }
.secondary:hover:not(:disabled) { background: #eef3ef; }
.back { margin-top: -9px; }

.error, .refresh-note { font-size: 14px; overflow-wrap: anywhere; }
.error { color: var(--error); }
.refresh-note { color: var(--muted); }
.status {
  display: grid;
  gap: 5px;
  padding: 14px;
  background: #f3f6f3;
  border-left: 3px solid #91a99a;
  border-radius: 0 6px 6px 0;
}
.status[data-tone="success"] { background: #eaf5ed; border-color: var(--primary); }
.status[data-tone="error"] { background: #fbf0ef; border-color: var(--error); }
.status p, .invite { font-size: 14px; overflow-wrap: anywhere; }
.invite { display: grid; gap: 5px; }
.invite dt { color: var(--muted); }
.invite dd { font-weight: 600; }

@media (max-width: 540px) {
  .masthead { min-height: 56px; padding: 0 20px; }
  .layout { padding: 32px 14px 28px; }
  .activation { padding: 20px; gap: 20px; }
  h1 { font-size: 27px; }
}
@media (max-width: 360px) {
  .copy-row { grid-template-columns: 1fr; }
}
