/* Shared styles for app legal pages (e.g. /toybox/legal/, /toybox/privacy/, /toybox/terms/).
   Same palette and type as the homepage. */

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

:root {
  --bg:        #f4eee2;
  --ink:       #1b1b1b;
  --ink-mid:   #6b665d;
  --ink-light: #9d9483;
  --rule:      #e2dacb;
  --gold:      #C4A75E;
  --card:      rgba(255, 255, 255, 0.55);
  --serif:     'Lora', Georgia, 'Times New Roman', serif;
}

html {
  background: var(--bg) url("/assets/kizuna-background.png") no-repeat top left;
  background-size: cover;
  background-attachment: fixed;
  color: var(--ink);
  font-family: 'Geist', system-ui, sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100dvh;
  padding: 3rem 1.5rem 4rem;
}

main {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}

/* ── Top bar ── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 3rem;
}

.home-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink-mid);
  font-size: 0.6875rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.home-link img {
  width: 28px;
  height: auto;
  display: block;
}

.home-link:hover { color: var(--ink); }

.crumb {
  font-size: 0.875rem;
  color: var(--ink-mid);
  text-decoration: none;
}

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

/* ── Page heading ── */
.app-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.app-head img {
  width: 56px;
  height: 56px;
  border-radius: 13px;
  border: 1px solid var(--rule);
  display: block;
}

.eyebrow {
  font-size: 0.8125rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-light);
}

h1 {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 5vw, 2.5rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.updated {
  font-size: 0.9375rem;
  color: var(--ink-mid);
  margin-top: 0.5rem;
}

.summary {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 1.2rem 1.4rem;
  margin: 2rem 0 0.5rem;
}

/* ── Document body ── */
.doc h2 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 2.4rem 0 0.7rem;
}

.doc h3 {
  font-size: 1rem;
  font-weight: 500;
  margin: 1.4rem 0 0.4rem;
}

.doc p,
.doc li {
  font-size: 1.0625rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--ink-mid);
}

.doc strong { font-weight: 500; color: var(--ink); }

.doc p + p { margin-top: 0.85rem; }

.doc ul {
  margin: 0.6rem 0 0.2rem 1.25rem;
}

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

.doc a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
}

.doc a:hover { opacity: 0.7; }

/* ── Hub page links ── */
.doc-list {
  list-style: none;
  display: grid;
  gap: 0.8rem;
  margin-top: 2.2rem;
}

.doc-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 1.2rem 1.4rem;
  text-decoration: none;
  color: var(--ink);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.doc-link:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--ink-light);
}

.doc-link-title {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
}

.doc-link-desc {
  font-size: 0.9375rem;
  font-weight: 300;
  color: var(--ink-mid);
  margin-top: 0.2rem;
  line-height: 1.5;
}

.doc-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--ink-light);
}

/* ── Footer ── */
footer {
  margin-top: 3.5rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem 1.2rem;
  font-size: 0.875rem;
  color: #5f5a51;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
}

footer a {
  color: #5f5a51;
  text-decoration: none;
}

footer a:hover { color: var(--ink); }

footer a[aria-current="page"] {
  color: var(--ink);
  border-bottom: 1px solid var(--gold);
}

@media (prefers-reduced-motion: reduce) {
  .doc-link { transition: none; }
}

@media (max-width: 480px) {
  body { padding: 2rem 1rem 3rem; }
  .topbar { margin-bottom: 2.2rem; }
  .doc p, .doc li { font-size: 1rem; }
}
