/* Sparta Travel Agent — minimal, readable, responsive */
:root {
  --bg: #fbf8f2;
  --surface: #ffffff;
  --ink: #1f1c17;
  --muted: #6b645a;
  --line: #e7e0d3;
  --accent: #9c3b1f;      /* Laconian terracotta */
  --accent-ink: #ffffff;
  --accent-soft: #f6e7e0;
  --olive: #5b6b2f;
  --radius: 14px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 18px/1.6 var(--sans);
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 18px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.small { font-size: .85rem; color: var(--muted); }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 600 1.15rem/1 var(--serif); }
.brand em { font-style: normal; color: var(--accent); }

/* Intro */
.intro { padding: 56px 0 26px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 2.9rem); margin: 0 0 14px; }
.lead { font-size: 1.15rem; color: var(--muted); margin: 0; max-width: 34em; }

/* Card */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.notice { background: var(--accent-soft); padding: 14px 18px; border-radius: 10px; }

/* Guide */
.guide { position: relative; overflow: hidden; }
.progress { position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--line); }
.progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s ease; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.step { display: none; animation: fade .25s ease; }
.step.is-active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
legend { font: 600 1.45rem/1.3 var(--serif); padding: 0; margin: 6px 0 6px; }
.hint { color: var(--muted); margin: 0 0 16px; font-size: .97rem; }
legend + .chips { margin-top: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  font: inherit; font-size: 1rem; cursor: pointer;
  padding: 10px 16px; border-radius: 999px;
  background: var(--bg); color: var(--ink); border: 1.5px solid var(--line);
  transition: border-color .15s, background .15s, color .15s;
}
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip:focus-visible, .btn:focus-visible, textarea:focus-visible { outline: 3px solid rgba(156,59,31,.35); outline-offset: 2px; }
textarea {
  width: 100%; font: inherit; padding: 14px; border-radius: 10px;
  border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); resize: vertical;
}
.nav { display: flex; align-items: center; gap: 12px; margin-top: 28px; }
.count { flex: 1; text-align: center; color: var(--muted); font-size: .9rem; }
.btn {
  white-space: nowrap;
  font: 600 1rem/1 var(--sans); cursor: pointer; padding: 13px 22px; border-radius: 10px;
  border: 1.5px solid var(--ink); background: var(--ink); color: #fff;
}
.btn.primary { background: var(--accent); border-color: var(--accent); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn[disabled] { opacity: .45; cursor: default; }
.skip { margin: 18px 0 0; font-size: .92rem; text-align: center; }

/* Ads */
.ad { margin: 28px 0; text-align: center; min-height: 100px; }
.ad-label { display: block; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }

/* Results */
.results { margin-top: 28px; scroll-margin-top: 16px; }
.loading { text-align: center; padding: 40px 0; color: var(--muted); }
.spinner { width: 38px; height: 38px; margin: 0 auto 14px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error { border-color: #e2b4a5; background: var(--accent-soft); }

.plan h2 { font-size: clamp(1.6rem, 4vw, 2.1rem); margin: 0 0 12px; }
.plan .intro-text { font-size: 1.08rem; }
.answers { list-style: none; padding: 14px 16px; margin: 20px 0 6px; background: var(--bg); border-radius: 10px; font-size: .9rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 18px; }
.answers b { color: var(--ink); font-weight: 600; }
.day { margin-top: 34px; }
.day h3 { font-size: 1.35rem; margin: 0 0 4px; padding-bottom: 8px; border-bottom: 2px solid var(--accent); }
.day .day-sum { color: var(--muted); margin: 8px 0 0; }
.stops { list-style: none; padding: 0; margin: 0; }
.stop { padding: 16px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 96px 1fr; gap: 4px 16px; }
.stop:last-child { border-bottom: 0; }
.when { color: var(--olive); font-weight: 600; font-size: .9rem; padding-top: 3px; }
.stop-name { font-weight: 600; font-size: 1.08rem; }
.stop-area { color: var(--muted); font-size: .88rem; }
.stop p { margin: 4px 0 0; }
.also, .tips { margin-top: 34px; }
.also h3, .tips h3 { font-size: 1.15rem; margin: 0 0 8px; }
.also ul, .tips ul { margin: 0; padding-left: 20px; }
.also li, .tips li { margin: 6px 0; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); }
.print-head { display: none; }

/* Footer */
.site-footer { margin-top: 70px; border-top: 1px solid var(--line); padding: 28px 0 40px; text-align: center; font-size: .95rem; }
.site-footer p { margin: 6px 0; }

/* Place pages */
.place { padding-top: 26px; }
.crumbs { font-size: .88rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.place-head { padding: 26px 0 8px; }
.pill { display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--olive); background: #eef0e3; border-radius: 999px; padding: 4px 12px; }
.place-head h1 { margin: 14px 0 8px; }
.where { display: flex; align-items: center; gap: 6px; color: var(--muted); margin: 0; }
.where svg { color: var(--accent); flex: none; }
.place-grid { display: grid; grid-template-columns: 1fr; gap: 8px 40px; margin-top: 18px; }
.place-body p { margin: 0 0 1.1em; }
.place-body p:first-child::first-letter { font-family: var(--serif); font-size: 3.1em; float: left; line-height: .9; padding: 6px 8px 0 0; color: var(--accent); }
.box { border-left: 3px solid var(--accent); padding: 4px 0 4px 18px; margin-bottom: 24px; }
.box.soft { border-left-color: var(--olive); }
.box h2 { font-size: 1.1rem; margin: 0 0 8px; }
.box p { margin: 0 0 8px; }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { padding-left: 26px; position: relative; margin: 7px 0; }
.checks li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 12px; height: 7px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.cta { margin: 30px 0; text-align: center; background: var(--accent-soft); border-color: #efd2c6; }
.cta h2 { margin: 0 0 8px; font-size: 1.4rem; }
.cta p { margin: 0 auto 18px; max-width: 30em; color: var(--muted); }
.related h2 { font-size: 1.3rem; }
.related-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.related-list a { display: block; height: 100%; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; transition: border-color .15s; }
.related-list a:hover { border-color: var(--accent); }
.related-list b { display: block; color: var(--accent); margin-bottom: 4px; }
.related-list span { font-size: .9rem; color: var(--muted); line-height: 1.45; display: block; }
.source { margin-top: 28px; }
@media (min-width: 900px) {
  .wrap.place { max-width: 980px; }
  .place-grid { grid-template-columns: minmax(0, 1fr) 300px; }
}
@media (max-width: 560px) { .related-list { grid-template-columns: 1fr; } }

/* Simple content pages (privacy) */
.page { padding: 40px 0; }
.page h1 { font-size: 2rem; }

@media (max-width: 560px) {
  body { font-size: 17px; }
  .card { padding: 22px 18px; }
  .intro { padding: 36px 0 20px; }
  .stop { grid-template-columns: 1fr; }
  .nav { flex-wrap: wrap; }
  .count { order: -1; flex-basis: 100%; text-align: left; }
  .nav .btn { flex: 1; }
}

/* Print: only the plan, with link addresses written out */
@media print {
  @page { margin: 16mm; }
  body { background: #fff; font-size: 11.5pt; }
  .site-header, .site-footer, .intro, .guide, .ad, #resultsAd, .actions, .skip, noscript, .cta, .related, .crumbs { display: none !important; }
  .results { margin: 0; }
  .card { border: 0; padding: 0; }
  .print-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font: 600 12pt var(--serif); }
  .print-head img { width: 26px; height: 26px; }
  .day h3 { break-after: avoid; }
  .stop { break-inside: avoid; grid-template-columns: 80px 1fr; }
  a { color: var(--ink); text-decoration: none; }
  .stop-name a::after, .also a::after { content: attr(data-print); display: block; font-weight: 400; font-size: 9pt; color: var(--muted); word-break: break-all; }
}

a.btn { display: inline-block; text-decoration: none; }
@media (min-width: 900px) { body:has(.wrap.place) .site-header .wrap { max-width: 980px; } }

/* Live writing */
.thinking { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .95rem; margin: 24px 0 0; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); opacity: .3; animation: dot 1.2s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.cursor { display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -0.15em; background: var(--accent); animation: blink .9s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.plan-body > h2:first-child { margin-top: 0; }
@media print { .thinking, .cursor { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .dots i, .cursor { animation: none; } }
