/* Old Photo Format Identifier */
:root {
  --bg: #f6f1e7;
  --bg-2: #ede4d3;
  --ink: #2b241b;
  --muted: #6b5f4e;
  --line: #c9b896;
  --accent: #8a4b2e;
  --accent-2: #b56b3a;
  --paper: #fbf6ec;
  --card: #fffaf0;
  --shadow: 0 1px 2px rgba(43,36,27,.08), 0 6px 24px rgba(43,36,27,.08);
  --radius: 10px;
  --radius-sm: 6px;
  --max: 1100px;
  --pad: clamp(16px, 3vw, 32px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Georgia, "Times New Roman", serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
a:hover { color: var(--accent-2); }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* Header */
.site-header {
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: .2px;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.brand-text { font-size: 1.05rem; }

.site-nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  font-size: .95rem;
}
.site-nav a:hover { background: var(--paper); color: var(--accent); }

/* Hero */
.hero {
  padding: 40px 0 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
}
.hero h1 {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  margin: 0 0 12px;
  line-height: 1.2;
  color: var(--ink);
}
.hero .lead {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 720px;
  margin: 0 0 8px;
}
.hero .meta {
  font-size: .85rem;
  color: var(--muted);
  margin: 0;
}

/* Sections */
section {
  margin-bottom: 48px;
}
section h2 {
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--line);
}
.hint {
  color: var(--muted);
  margin: 0 0 16px;
}

/* Qflow */
.qflow {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.qstep {
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 12px;
  background: var(--card);
}
.qstep legend {
  font-weight: 600;
  padding: 0 6px;
  color: var(--accent);
}
.optgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.opt {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.opt:hover { border-color: var(--accent); background: var(--card); }
.opt input { margin-top: 3px; accent-color: var(--accent); }
.opt span { font-size: .95rem; }

.actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.btn {
  font: inherit;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.ghost {
  background: transparent;
  color: var(--accent);
}
.btn.ghost:hover { background: var(--card); color: var(--accent-2); }

/* Result area */
.result-area {
  margin-top: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.empty-state {
  color: var(--muted);
  padding: 12px 4px;
}
.empty-state h3 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 1.1rem;
}
.match-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}
.match {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: var(--card);
}
.match h3 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  color: var(--accent);
}
.match p { margin: 0 0 6px; }
.match .score {
  font-size: .9rem;
  color: var(--muted);
}
.match .why {
  font-size: .95rem;
  color: var(--ink);
}

/* Compare cards */
.cardgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.fmt-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.fmt-thumb {
  height: 120px;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  background-color: var(--bg-2);
  background-size: cover;
  background-position: center;
  border: 1px solid var(--line);
}
.fmt-thumb.daguerreotype {
  background: linear-gradient(135deg, #d8d8d8 0%, #888 50%, #d8d8d8 100%);
}
.fmt-thumb.tintype {
  background: linear-gradient(135deg, #6b6b6b 0%, #3a3a3a 100%);
}
.fmt-thumb.ambrotype {
  background: linear-gradient(135deg, #b8a98a 0%, #6b5f4e 100%);
}
.fmt-thumb.cabinet {
  background: linear-gradient(180deg, #f1e6cc 0%, #d8c8a0 100%);
}
.fmt-thumb.carte {
  background: linear-gradient(180deg, #e8dcc0 0%, #c8b890 100%);
}
.fmt-thumb.stereograph {
  background: linear-gradient(90deg, #e8dcc0 0%, #c8b890 49%, #e8dcc0 51%, #c8b890 100%);
}
.fmt-card h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  color: var(--accent);
}
.fmt-list {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
  font-size: .95rem;
}
.fmt-list li { padding: 2px 0; }
.fmt-note {
  font-size: .9rem;
  color: var(--muted);
  margin: auto 0 0;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
}

/* Timeline */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 3px solid var(--line);
  padding-left: 16px;
  display: grid;
  gap: 10px;
}
.timeline li {
  position: relative;
  padding-left: 6px;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 8px;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
}
.timeline strong {
  color: var(--accent);
  margin-right: 6px;
}

/* Preserve tips */
.tips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.tip {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}
.tip h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  color: var(--accent);
}
.tip p { margin: 0; font-size: .95rem; }

/* Checklist */
.checklist {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 16px 16px 36px;
  box-shadow: var(--shadow);
  max-width: 720px;
}
.checklist li {
  padding: 4px 0;
  font-size: .98rem;
}
.checklist-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

/* Content panel */
.content-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  max-width: 820px;
}
.content-panel h2 { color: var(--ink); }
.content-panel p { margin: 0 0 12px; }

/* Footer */
.site-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  margin-top: 32px;
  padding: 20px 0;
  color: var(--muted);
  font-size: .9rem;
}
.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.site-footer nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.tiny { font-size: .8rem; color: var(--muted); }

/* Print */
@media print {
  .site-header, .site-footer, .actions, .checklist-actions, .result-area { display: none; }
  body { background: #fff; color: #000; }
  section { page-break-inside: avoid; }
}

/* Responsive */
@media (max-width: 640px) {
  .site-header .container { flex-direction: column; align-items: flex-start; }
  .site-nav { gap: 8px; }
  .hero { padding-top: 24px; }
  .optgrid { grid-template-columns: 1fr; }
  .cardgrid { grid-template-columns: 1fr; }
  .tips { grid-template-columns: 1fr; }
}



/* 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;
}
