/* TagoKoto website. Palette from the app's AppColors (lib/core/theme/app_colors.dart). */

:root {
  color-scheme: light dark;
  --bg: #f4f7fc;          /* paper */
  --surface: #e7edf6;     /* paper-dim */
  --line: #d3deec;        /* paper-line */
  --text: #0f1b33;        /* ink-deep */
  --muted: #3d4b63;
  --link: #1d4ed8;
  --focus: #1d4ed8;
  --accent: #e0a03e;      /* amber, decorative only */
  --flag-bg: #fdecc8;
  --flag-text: #4a2f00;
  --measure: 42rem;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1420;        /* charcoal */
    --surface: #18202e;   /* charcoal-raised */
    --line: #2a3547;      /* charcoal-line */
    --text: #e7ecf3;      /* paper-text */
    --muted: #aab6c8;
    --link: #8fb4f0;      /* mist */
    --focus: #8fb4f0;
    --flag-bg: #4a3410;
    --flag-text: #ffe2a8;
  }
}

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

html {
  background: var(--bg);
  color: var(--text);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 1.0625rem;
}

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

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

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100%;
  padding: 0.5rem 1rem;
  background: var(--text);
  color: var(--bg);
  z-index: 1;
}

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

/* ---------- Landing ---------- */

.landing {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
}

.landing-inner {
  max-width: 34rem;
  text-align: center;
}

.landing .mark {
  width: 112px;
  height: 112px;
}

.landing h1 {
  margin: 1.25rem 0 0.75rem;
  font-size: clamp(2.25rem, 6vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.landing h1::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 3px;
  margin: 1rem auto 0;
  border-radius: 2px;
  background: var(--accent);
}

.landing p {
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.125rem;
}

.legal-links ul {
  list-style: none;
  margin: 2.25rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 2rem;
}

.legal-links a {
  display: inline-block;
  padding: 0.5rem 0.25rem; /* comfortable touch target */
  font-weight: 600;
}

/* ---------- Document pages ---------- */

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

.site-header .inner,
.site-footer .inner,
.doc {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.site-header .inner {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.home-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.25rem 0;
  color: var(--text);
  font-weight: 700;
  font-size: 1.125rem;
  text-decoration: none;
}

.home-link img {
  width: 36px;
  height: 36px;
}

.doc {
  flex: 1;
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.doc h1 {
  margin: 0 0 0.25rem;
  font-size: clamp(1.875rem, 5vw, 2.25rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.doc .updated {
  margin-top: 0;
  color: var(--muted);
}

.doc h2 {
  margin: 2.5rem 0 0.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 1.375rem;
  line-height: 1.3;
}

.doc h3 {
  margin: 1.75rem 0 0.25rem;
  font-size: 1.125rem;
}

.doc p,
.doc li {
  max-width: 68ch;
}

.doc li + li {
  margin-top: 0.35rem;
}

.doc .summary {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border-left: 4px solid var(--accent);
  border-radius: 4px;
}

.doc .summary ul {
  margin: 0;
  padding-left: 1.25rem;
}

.toc {
  margin: 1.5rem 0;
}

.toc h2 {
  margin: 0 0 0.25rem;
  padding: 0;
  border: 0;
  font-size: 1rem;
}

.toc ol {
  margin: 0;
  padding-left: 1.5rem;
}

.toc li + li {
  margin-top: 0.15rem;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--surface);
  padding: 0.1em 0.3em;
  border-radius: 3px;
}

/* Unresolved facts the owner must supply before publication. */
.placeholder {
  background: var(--flag-bg);
  color: var(--flag-text);
  font-weight: 700;
  padding: 0.05em 0.3em;
  border-radius: 3px;
}

.site-footer {
  border-top: 1px solid var(--line);
}

.site-footer .inner {
  padding-top: 1rem;
  padding-bottom: 1.5rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

.site-footer a {
  display: inline-block;
  padding: 0.5rem 0;
}

@media print {
  .skip-link,
  .site-header,
  .site-footer,
  .toc {
    display: none;
  }
  a {
    color: inherit;
  }
}
