:root {
  --paper: #f4ecd6;
  --paper-deep: #e8dcb8;
  --ink: #2b1d10;
  --ink-soft: #5a4633;
  --accent: #8b3a2f;
  --accent-deep: #6b2a22;
  --rule: #c9b68a;
  --rule-soft: #d9c8a3;
  --focus: #2a6e8f;
  --ok: #3f6b3a;
  --warn: #8a5a1a;
  --shadow: rgba(43, 29, 16, 0.12);
  --radius: 10px;
  --radius-sm: 6px;
  --font-body: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(ellipse at top, #fbf2d9 0%, #f0e3bf 60%, #e4d2a1 100%);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; }
a:hover { border-bottom-color: var(--accent); }

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

.skip-link {
  position: absolute;
  left: -9999px;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

.site-header {
  background: linear-gradient(180deg, #efe2bf 0%, #e4d2a1 100%);
  border-bottom: 2px solid var(--rule);
  padding: 18px 0 14px;
  box-shadow: 0 2px 0 var(--shadow);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark { display: inline-flex; }
.site-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  margin: 0;
  color: var(--ink);
  letter-spacing: 0.2px;
}
.site-tagline {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--ink-soft);
  font-style: italic;
}
.site-nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-nav a {
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--ink-soft);
  padding: 4px 2px;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover { color: var(--accent); border-bottom-color: var(--accent); }

main { padding: 36px 0 64px; }

.intro {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 28px;
  box-shadow: 0 1px 0 var(--shadow);
}
.intro-lead { font-size: 19px; margin-top: 0; }
.section-note {
  color: var(--ink-soft);
  font-size: 14px;
  margin: 0 0 18px;
}

h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--ink);
  border-bottom: 2px solid var(--rule);
  padding-bottom: 8px;
}
h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--ink);
}
h4 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--ink-soft);
}

.identifier { margin-bottom: 40px; }
.identifier-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.features { display: flex; flex-direction: column; gap: 18px; }
.feature-group {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 16px 18px;
  margin: 0;
  box-shadow: 0 1px 0 var(--shadow);
}
.feature-group legend {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  color: var(--ink);
  padding: 0 6px;
}
.options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.option { display: block; cursor: pointer; }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option-card {
  display: block;
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: #fbf5df;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  height: 100%;
}
.option-card strong {
  display: block;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}
.option-card small {
  display: block;
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.4;
}
.option input:focus-visible + .option-card {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.option input:checked + .option-card {
  border-color: var(--accent);
  background: #f7e4d6;
  box-shadow: inset 0 0 0 1px var(--accent);
}
.option:hover .option-card { border-color: var(--accent); }

.feature-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
  background: transparent;
  color: var(--ink);
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent-deep); }
.btn-primary:hover:not(:disabled) { background: var(--accent-deep); }
.btn-outline { border-color: var(--rule); background: var(--paper); }
.btn-outline:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.btn-ghost { color: var(--ink-soft); }
.btn-ghost:hover:not(:disabled) { color: var(--accent); }
.btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.result-panel {
  position: sticky;
  top: 16px;
  background: var(--paper);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: 0 4px 12px var(--shadow);
}
.result-panel h3 {
  margin-bottom: 12px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 6px;
}
.era-result {
  background: #fbf5df;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 14px;
}
.era-range {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--accent-deep);
  margin-bottom: 6px;
}
.era-confidence {
  font-size: 13px;
  color: var(--ink-soft);
}
.era-reasoning, .era-check {
  margin-bottom: 14px;
}
.era-reasoning h4, .era-check h4 {
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--ink-soft);
}
.era-reasoning ul, .era-check ul {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--ink);
}
.era-reasoning li, .era-check li { margin-bottom: 4px; }
.empty-state {
  color: var(--ink-soft);
  font-style: italic;
  font-size: 13px;
}
.result-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.examples { margin-bottom: 40px; }
.example-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.example-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: 0 1px 0 var(--shadow);
}
.example-card h3 { font-size: 17px; }
.example-card dl {
  margin: 8px 0;
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 2px 10px;
  font-size: 13px;
}
.example-card dt { color: var(--ink-soft); font-weight: 600; }
.example-card dd { margin: 0; color: var(--ink); }
.example-card p { margin: 8px 0 0; font-size: 13px; color: var(--ink-soft); }

.collection { margin-bottom: 40px; }
.collection-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.collection-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.collection-item {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.collection-item .item-info { flex: 1; min-width: 200px; }
.collection-item .item-era {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--accent-deep);
  font-size: 16px;
}
.collection-item .item-meta {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 2px;
}
.collection-item .item-actions { display: flex; gap: 6px; }
.collection-item .btn { padding: 6px 10px; font-size: 12px; }

.reference { margin-bottom: 40px; }
.reference-block {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 14px;
}
.reference-block h3 { font-size: 17px; margin-bottom: 8px; }
.reference-block ul {
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
  color: var(--ink);
}
.reference-block li { margin-bottom: 6px; }
.last-updated {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 10px;
  font-style: italic;
}

.site-footer {
  background: #2b1d10;
  color: #e8dcb8;
  padding: 24px 0;
  margin-top: 40px;
}
.site-footer p { margin: 0; font-size: 13px; }
.footer-links { margin-top: 8px; display: flex; gap: 14px; flex-wrap: wrap; }
.footer-links a { color: #f4ecd6; font-size: 13px; border-bottom: 1px solid transparent; }
.footer-links a:hover { border-bottom-color: #f4ecd6; }

@media (max-width: 900px) {
  .identifier-grid { grid-template-columns: 1fr; }
  .result-panel { position: static; }
  .site-title { font-size: 22px; }
  h2 { font-size: 24px; }
}
@media (max-width: 600px) {
  .options { grid-template-columns: 1fr; }
  .header-inner { flex-direction: column; align-items: flex-start; }
  .site-nav { gap: 12px; }
  .era-range { font-size: 20px; }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
