@import url("./tokens.css");
:root {
  --bg: var(--canvas);
  --surface-2: var(--surface);
  --card-border: rgba(var(--text-rgb), 0.14);
  --inner-bg: rgba(var(--ink-rgb), 0.035);
  --inner-border: rgba(var(--ink-rgb), 0.14);
  --text-secondary: var(--text-2);
  --text-muted: var(--text-2);
  --accent-light: var(--action-text);
  --red: var(--brand-mark);
  --shadow: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family:
    'Open Sans',
    'PingFang SC',
    'Noto Sans SC',
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-light);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.wrapper {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}

header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand img {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.brand span {
  font-family: 'Open Sans', system-ui, 'PingFang SC', 'Noto Sans SC', sans-serif;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
}

h1 {
  font-family: 'Open Sans', system-ui, 'PingFang SC', 'Noto Sans SC', sans-serif;
  font-weight: 600;
  font-size: 32px;
  letter-spacing: -0.02em;
  margin: 0;
}

.meta {
  display: flex;
  gap: 16px;
  color: var(--text-muted);
  font-size: 14px;
}

.summary {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 20px 22px;
  margin-bottom: 32px;
  color: var(--text-secondary);
  font-size: 15px;
}

.section {
  margin-bottom: 28px;
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}

.section-num {
  font-family: 'Open Sans', system-ui, 'PingFang SC', 'Noto Sans SC', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-light);
  background: var(--inner-bg);
  border: 1px solid var(--inner-border);
  border-radius: 999px;
  padding: 3px 9px;
}

h2 {
  font-family: 'Open Sans', system-ui, 'PingFang SC', 'Noto Sans SC', sans-serif;
  font-weight: 600;
  font-size: 19px;
  margin: 0;
  letter-spacing: -0.01em;
}

.clause {
  margin: 0 0 12px;
  color: var(--text-secondary);
}

.clause-num {
  color: var(--text-muted);
  margin-right: 6px;
}

.list-items {
  margin: 0 0 12px;
  padding-left: 22px;
  color: var(--text-secondary);
}

.list-items li {
  margin-bottom: 6px;
}

.closing {
  background: var(--inner-bg);
  border: 1px solid var(--inner-border);
  border-radius: 16px;
  padding: 18px 20px;
  color: var(--text-secondary);
  font-size: 15px;
  margin: 32px 0;
}

footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--inner-border);
  color: var(--text-muted);
  font-size: 14px;
  flex-wrap: wrap;
}

footer a {
  color: var(--text-secondary);
}

footer .footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.home-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 32px;
}

.home-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 16px 18px;
  color: var(--text);
  box-shadow: var(--shadow);
}

.home-links a:hover {
  border-color: rgba(var(--text-rgb), 0.28);
  text-decoration: none;
}

.home-lede {
  color: var(--text-secondary);
  font-size: 16px;
  max-width: 46ch;
}

@media (max-width: 600px) {
  h1 {
    font-size: 26px;
  }
  .meta {
    flex-direction: column;
    gap: 6px;
  }
  footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Standalone content islands use the same ink/paper contract as the app. */
.summary, .closing, .home-links a {
  background: var(--island); color: var(--ink);
  border-color: rgba(var(--action-rgb), .3); border-radius: 16px;
}
.summary a, .closing a { color: var(--action-text); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

:root { color-scheme: light; }
.brand { color: var(--action); }
::selection { background: var(--action); color: var(--on-action); }
footer a { display: inline-flex; align-items: center; min-height: 44px; }
