/* The store's small pages (terms, privacy, refunds, lost key) in the map design of map-sample.html: the same parchment
   and graticule, the top bar, the cartouche footer; the text on a sheet, its sections listed in a margin like a map's
   legend. */
:root {
  --parchment: #e3d5ac;
  --deep: #d3bd85;
  --surface: #f2e8cc;
  --ink: #2e2417;
  --ink-faded: #6e5d3e;
  --brass: #8c6a2f;
  --display: "Cinzel", serif;
  --body: "Vollkorn", Georgia, serif;
  --line: color-mix(in srgb, var(--ink) 14%, transparent);
  --line-soft: color-mix(in srgb, var(--ink) 7%, transparent);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.06rem;
  line-height: 1.6;
  background-color: var(--parchment);
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px),
    radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--surface) 70%, transparent), transparent 70%);
  background-size:
    96px 96px,
    96px 96px,
    100% 100%;
  overflow-x: hidden;
}
a {
  color: var(--brass);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--ink);
}
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}
[data-only][hidden] {
  display: none !important;
}

/* -- the top bar -- */
.top {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--parchment) 86%, transparent);
  backdrop-filter: blur(8px);
}
.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.brand:hover {
  color: var(--ink);
}
.top-links {
  display: flex;
  align-items: center;
  gap: 16px;
}
.back {
  color: var(--ink-faded);
  font-size: 0.95rem;
  text-decoration: none;
}
.back:hover {
  color: var(--ink);
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid var(--brass);
  border-radius: 99px;
  background: var(--brass);
  color: var(--surface);
  font-family: var(--display);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.btn:hover {
  color: var(--surface);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--brass) 35%, transparent);
}
.btn:disabled {
  opacity: 0.6;
  transform: none;
  box-shadow: none;
  cursor: default;
}
.top .btn {
  padding: 7px 16px;
  font-size: 0.8rem;
}
.lang-menu {
  position: relative;
}
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.35em 0.75em 0.35em 0.6em;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.lang-toggle svg {
  fill: none;
  stroke: var(--brass);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lang-toggle:hover,
.lang-menu.open .lang-toggle {
  border-color: var(--brass);
  background: var(--surface);
}
.lang-list {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 160px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 12px 30px -10px color-mix(in srgb, var(--ink) 40%, transparent);
}
.lang-list[hidden] {
  display: none;
}
.lang-list button {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 0.5em 0.7em;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}
.lang-list button:hover {
  background: var(--deep);
}
.lang-list button[aria-checked="true"] {
  color: var(--brass);
  font-weight: 600;
}
.lang-list small {
  color: var(--ink-faded);
  font-size: 0.75rem;
}

/* -- the page: a heading, the sheet, its legend -- */
.doc {
  padding: 56px 0 24px;
}
.doc-head {
  max-width: 760px;
  margin: 0 auto 30px;
  text-align: center;
}
.region-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--brass);
  font-family: var(--display);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.region-label::before,
.region-label::after {
  content: "";
  width: 46px;
  border-top: 1px solid var(--brass);
  opacity: 0.6;
}
.doc-head h1 {
  margin: 10px 0 6px;
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 2.9rem);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.updated {
  margin: 0;
  color: var(--ink-faded);
  font-style: italic;
}
.doc-body {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.doc-body.single {
  grid-template-columns: minmax(0, 640px);
  justify-content: center;
}
.legend {
  position: sticky;
  top: 84px;
  padding: 16px 16px 10px;
  border: 2px solid var(--ink);
  outline: 1px solid var(--ink);
  outline-offset: 3px;
  background: var(--surface);
}
.legend h3 {
  margin: 0 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--ink);
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-align: center;
  text-transform: uppercase;
}
.legend a {
  display: block;
  padding: 5px 2px;
  border-bottom: 1px dashed var(--line);
  color: var(--ink);
  font-size: 0.92rem;
  text-decoration: none;
}
.legend a:last-child {
  border-bottom: 0;
}
.legend a:hover,
.legend a.on {
  color: var(--brass);
}
.sheet {
  position: relative;
  padding: 34px 42px 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow:
    0 1px 0 var(--line),
    0 24px 50px -18px color-mix(in srgb, var(--ink) 40%, transparent);
}
.sheet::before,
.sheet::after {
  /* corner pins */
  content: "";
  position: absolute;
  top: -7px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #e9d9b0, var(--brass) 70%);
  box-shadow: 0 2px 3px color-mix(in srgb, var(--ink) 40%, transparent);
}
.sheet::before {
  left: 22px;
}
.sheet::after {
  right: 22px;
}
.sheet h2 {
  scroll-margin-top: 84px;
  margin: 1.9em 0 0.45em;
  font-family: var(--display);
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.sheet h2::before {
  content: "✦ ";
  color: var(--brass);
  font-size: 0.8em;
}
.sheet > article > p:first-of-type {
  font-size: 1.12rem;
}
.sheet p {
  margin: 0 0 0.9em;
}
.sheet ul {
  padding-left: 22px;
}
.sheet li::marker {
  color: var(--brass);
}

/* -- the lost-key form -- */
.key-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.key-form input {
  flex: 1 1 240px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--parchment);
  color: var(--ink);
  font: inherit;
}
.key-form input:focus {
  border-color: var(--brass);
  outline: 2px solid color-mix(in srgb, var(--brass) 30%, transparent);
}
.result {
  margin: 16px 0 0;
  padding: 10px 14px;
  border-left: 3px solid var(--brass);
  background: color-mix(in srgb, var(--brass) 10%, transparent);
}
.result.error {
  border-color: #8a3a2a;
  background: color-mix(in srgb, #8a3a2a 9%, transparent);
}

/* -- the footer -- */
footer {
  padding: 48px 0 80px;
}
.cartouche {
  max-width: 520px;
  margin: 0 auto;
  padding: 18px 26px;
  border: 2px solid var(--ink);
  outline: 1px solid var(--ink);
  outline-offset: 4px;
  border-radius: 40px / 18px;
  background: var(--surface);
  text-align: center;
}
.cartouche .display {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.cartouche small {
  color: var(--ink-faded);
  font-style: italic;
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  margin-top: 28px;
  font-size: 0.92rem;
}
.foot-links a {
  color: var(--ink-faded);
  text-decoration: none;
}
.foot-links a:hover,
.foot-links a[aria-current] {
  color: var(--brass);
  text-decoration: underline dotted;
}

@media (max-width: 800px) {
  .doc-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .legend {
    position: static;
  }
  .sheet {
    padding: 26px 20px 28px;
  }
  .back {
    display: none;
  }
}
