/* AstroMaster legal pages — print-clean, readable, matches app theme */

:root {
  --bg: #FAFAF8;
  --surface: #FFFFFF;
  --ink: #1A1F2E;
  --ink-2: #4A4F5E;
  --muted: #8A8F99;
  --gold: #C5A572;
  --gold-soft: #E8D8B9;
  --navy: #1E2541;
  --navy-deep: #0F1426;
  --line: #E2E0DA;
  --highlight: #FBF6EB;
  --error: #B0463A;
  --success: #5D8F69;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* Header */
.site-header {
  background: linear-gradient(165deg, var(--navy-deep) 0%, var(--navy) 100%);
  color: #fff;
  padding: 32px 0;
  border-bottom: 3px solid var(--gold);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-mark {
  font-size: 32px;
  color: var(--gold);
}

.site-title {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.site-subtitle {
  display: block;
  color: var(--gold-soft);
  font-size: 13px;
  font-style: italic;
  font-family: inherit;
}

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Main */
main { padding: 48px 0 80px; }

h1 {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-size: 36px;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 12px;
  line-height: 1.2;
}

h2 {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--navy);
  margin-top: 36px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--navy);
  margin-top: 24px;
  margin-bottom: 8px;
}

p, ul, ol {
  margin-bottom: 16px;
  color: var(--ink-2);
}

ul, ol { padding-left: 24px; }
li { margin-bottom: 4px; }
strong { color: var(--ink); font-weight: 600; }
em { font-style: italic; }

a {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-color: rgba(197, 165, 114, 0.4);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}
a:hover { text-decoration-color: var(--gold); }

/* Page subtitle / dates */
.subtitle {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 32px;
}

/* Lead paragraph (intro) */
.lead {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: 24px;
}

/* Callout boxes */
.callout {
  background: var(--highlight);
  border-left: 3px solid var(--gold);
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: 4px;
}

.callout-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--gold);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.callout p:last-child { margin-bottom: 0; }

.callout.warning {
  background: rgba(176, 70, 58, 0.08);
  border-left-color: var(--error);
}
.callout.warning .callout-title { color: var(--error); }

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}

th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

th {
  background: var(--highlight);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.5px;
  color: var(--navy);
  text-transform: uppercase;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  background: var(--gold);
  color: var(--navy-deep);
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.2s;
  border: none;
  font-size: 15px;
  cursor: pointer;
  font-family: inherit;
}
.btn:hover { background: #B89760; text-decoration: none; }

.btn-secondary {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--line);
}
.btn-secondary:hover { background: var(--highlight); }

/* Step list */
.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 20px 0;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 12px 0 12px 44px;
  border-bottom: 1px solid var(--line);
}
.steps li:last-child { border-bottom: none; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

/* TOC */
.toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px 20px;
  margin-bottom: 32px;
}
.toc-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--gold);
  margin-bottom: 8px;
  text-transform: uppercase;
}
.toc ul { padding-left: 16px; margin-bottom: 0; }
.toc li { margin-bottom: 2px; font-size: 14px; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--gold); }

/* Footer */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255,255,255,0.55);
  padding: 32px 0;
  margin-top: 64px;
  font-size: 13px;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
}
.site-footer a { color: var(--gold-soft); }
.site-footer-nav {
  display: flex;
  gap: 20px;
}

/* Home page card grid */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 32px;
}
@media (min-width: 600px) {
  .card-grid { grid-template-columns: 1fr 1fr; }
}

.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.2s, transform 0.1s;
}
.card:hover {
  border-color: var(--gold);
  text-decoration: none;
  transform: translateY(-1px);
}
.card h3 {
  margin-top: 0;
  margin-bottom: 8px;
  color: var(--navy);
}
.card p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 0;
}
.card-icon {
  font-size: 24px;
  color: var(--gold);
  margin-bottom: 12px;
}

/* Form */
form {
  margin-top: 20px;
}
.field {
  margin-bottom: 16px;
}
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}
.field input, .field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--surface);
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold);
}
.field textarea { min-height: 100px; resize: vertical; }
.field-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

/* Print styles */
@media print {
  .site-header, .site-footer, .toc { display: none; }
  body { font-size: 11pt; }
  a { color: var(--ink) !important; }
}
