/* Kinverie public site. Colours are the app's tokens (lib/core/design_system/tokens.dart):
   warm canvas, forest primary actions, the stronger control borders and the visible focus
   colour. Fonts are the app's own files, served from this site. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/Inter-Regular.ttf") format("truetype");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/Inter-Medium.ttf") format("truetype");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/Inter-SemiBold.ttf") format("truetype");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/SourceSerif4-Regular.ttf") format("truetype");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/SourceSerif4-Semibold.ttf") format("truetype");
}

:root {
  color-scheme: light dark;
  --canvas: #f7f4ef;
  --panel: #ffffff;
  --text: #1c2321;
  --muted: #4c5a56;
  --primary: #24564a;
  --on-primary: #ffffff;
  --border: #d4dbd5;
  --control-border: #768580;
  --error: #a42c3a;
  --error-background: #f9e9eb;
  --focus: #1d5f9c;
  --warmth: #e6b67a;
  --subtle: #efebe4;
  --selected: #e3ece7;
  --ui: "Inter", system-ui, sans-serif;
  --editorial: "Source Serif 4", Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #151b19;
    --panel: #202824;
    --text: #f3f6f2;
    --muted: #bcc8c1;
    --primary: #a7d8c6;
    --on-primary: #13221c;
    --border: #506258;
    --control-border: #7d9088;
    --error: #f2a2ab;
    --error-background: #3a262a;
    --focus: #8fc1f0;
    --subtle: #283230;
    --selected: #2b3f38;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--ui);
  font-size: 1rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

a {
  color: var(--primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

main:focus,
h2[tabindex="-1"]:focus {
  outline: none;
}

h2[tabindex="-1"]:focus-visible {
  outline: 3px solid var(--focus);
}

h1,
h2,
h3,
h4 {
  line-height: 1.25;
  margin: 1.6em 0 0.5em;
}

h1 {
  font-family: var(--editorial);
  font-weight: 600;
  font-size: clamp(1.9rem, 1.4rem + 2.2vw, 2.75rem);
  margin-top: 0.6em;
}

h2 {
  font-family: var(--editorial);
  font-weight: 600;
  font-size: 1.5rem;
}

h3 {
  font-size: 1.15rem;
  font-weight: 600;
}

p,
ul,
ol,
table,
blockquote {
  margin: 0 0 1em;
}

li + li {
  margin-top: 0.35em;
}

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.95em;
}

.wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.wrap.narrow,
.doc {
  max-width: 46rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--panel);
  color: var(--text);
  border: 2px solid var(--focus);
  border-radius: 8px;
}

.skip-link:focus {
  top: 0.75rem;
}

/* Header and footer */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--canvas);
}

.header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.wordmark {
  font-family: var(--editorial);
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
}

.nav-list,
.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
}

.nav-list li + li,
.footer-list li + li {
  margin-top: 0;
}

.nav-list a,
.footer-list a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  font-weight: 500;
}

.nav-list a[aria-current="page"] {
  color: var(--text);
  text-decoration-thickness: 2px;
}

.site-footer {
  margin-top: 4rem;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.95rem;
}

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

/* Home */

.hero {
  background: var(--subtle);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 0 2rem;
  margin-bottom: 1rem;
}

.hero h1 {
  margin-top: 0.2em;
}

.eyebrow {
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 0;
}

.lead {
  font-size: 1.15rem;
  max-width: 38rem;
}

/* Documents */

.doc {
  margin-top: 1.5rem;
}

.doc + .doc {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding-top: 1rem;
}

.draft-notice {
  margin: 1.5rem 0 0;
  padding: 0.9rem 1rem;
  background: var(--panel);
  border: 1px solid var(--control-border);
  border-left: 6px solid var(--warmth);
  border-radius: 12px;
}

.draft-notice p {
  margin: 0;
}

.doc-version {
  color: var(--muted);
  font-weight: 500;
}

.placeholder {
  background: var(--subtle);
  border-bottom: 2px dotted var(--warmth);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: var(--panel);
  font-size: 0.95rem;
}

.prose th,
.prose td {
  text-align: left;
  vertical-align: top;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border);
}

.prose th {
  background: var(--subtle);
}

/* Deletion page */

.flow section {
  margin-top: 1rem;
}

.field {
  margin: 1.25rem 0 1rem;
}

.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.field input[type="email"],
.field input[type="text"] {
  display: block;
  width: 100%;
  max-width: 24rem;
  min-height: 48px;
  padding: 0.6rem 0.8rem;
  font: inherit;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--control-border);
  border-radius: 12px;
}

.field input[aria-invalid="true"] {
  border: 2px solid var(--error);
}

#code-input {
  max-width: 12rem;
  letter-spacing: 0.2em;
  font-variant-numeric: tabular-nums;
}

.field-check {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.field-check input {
  flex: none;
  width: 24px;
  height: 24px;
  margin: 0.15rem 0 0;
  accent-color: var(--primary);
}

.field-check label {
  margin: 0;
}

.field-error {
  color: var(--error);
  font-weight: 500;
  margin: 0.4rem 0 0;
}

.field-error:empty {
  display: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1rem 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.6rem 1.25rem;
  font: inherit;
  font-weight: 600;
  color: var(--primary);
  background: var(--panel);
  border: 1px solid var(--control-border);
  border-radius: 999px;
  cursor: pointer;
}

.button-primary {
  color: var(--on-primary);
  background: var(--primary);
  border-color: var(--primary);
}

.button-danger {
  color: #ffffff;
  background: var(--error);
  border-color: var(--error);
}

@media (prefers-color-scheme: dark) {
  .button-danger {
    color: #13221c;
  }
}

.button-quiet {
  border-color: transparent;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.button[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
}

.hint {
  color: var(--muted);
}

.hint:empty {
  display: none;
}

.receipt {
  padding: 0.9rem 1rem;
  background: var(--panel);
  border: 1px solid var(--control-border);
  border-radius: 12px;
}

.receipt code {
  font-size: 1.05rem;
  word-break: break-all;
}

.status-text {
  font-size: 1.1rem;
  font-weight: 500;
}

.notice {
  padding: 0.9rem 1rem;
  border-radius: 12px;
}

.notice-error {
  background: var(--error-background);
  border: 1px solid var(--error);
}
