/* Shared components and their responsive rules.
 * Keep ordered overrides intact; see web/static/styles/README.md. */
:root {
  --ink: #111;
  --muted: #777;
  --paper: #f5f5f2;
  --cream: #ececea;
  --sage: #999;
  --olive: #333;
  --rust: #666;
  --line: #d8d8d3;
  --white: #fff;
  --shadow: 0 20px 60px rgba(17, 17, 17, 0.12);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 15px;
  line-height: 1.6;
}
button,
input {
  font: inherit;
}
button,
a {
  color: inherit;
}
a {
  text-decoration: none;
}
img {
  display: block;
  max-width: 100%;
}
.wrap {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}
.text-link {
  transition: 0.2s opacity;
}
.text-link:hover {
  opacity: 0.55;
}
.btn {
  border: 1px solid transparent;
  border-radius: 2px;
  padding: 12px 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.025em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  cursor: pointer;
  transition:
    0.2s transform,
    0.2s background,
    0.2s color;
  white-space: normal;
  text-align: center;
  max-width: 100%;
  min-height: 44px;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  flex-shrink: 0;
}
.btn-small {
  padding: 9px 17px;
}
.btn-large {
  padding: 15px 23px;
}
.btn-full {
  width: 100%;
}
.btn-dark {
  background: var(--ink);
  color: white;
}
.btn-dark:hover {
  background: #333b33;
}
.btn-light {
  background: var(--paper);
  color: var(--ink);
}
.btn-outline {
  border-color: var(--ink);
  background: transparent;
}
.btn-quiet {
  background: #e4e1d8;
}
.eyebrow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
  display: flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
}
.eyebrow > span {
  width: 28px;
  height: 1px;
  background: #777;
}
.eyebrow.light {
  color: #d5d9d2;
}
.eyebrow.light > span {
  background: #aaa;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2 {
  font-family: Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1.04;
}
h1 em,
h2 em {
  font-weight: 400;
  color: #555;
}
.stack-form {
  display: grid;
  gap: 18px;
}
label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  display: grid;
  gap: 8px;
}
label span {
  color: var(--muted);
  font-weight: 400;
}
input {
  border: 1px solid #d8d4c9;
  background: rgba(255, 255, 255, 0.45);
  padding: 13px 14px;
  border-radius: 2px;
  outline: none;
  width: 100%;
}
input:focus {
  border-color: #6e786b;
  box-shadow: 0 0 0 3px rgba(83, 96, 79, 0.08);
}
.field-row {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.form-error {
  background: #f1ded7;
  color: #803b27;
  padding: 12px 14px;
  font-size: 11px;
  margin-bottom: 20px;
  border-left: 3px solid var(--rust);
}
.toast {
  position: fixed;
  z-index: 50;
  top: 20px;
  right: 24px;
  background: #212620;
  color: white;
  box-shadow: var(--shadow);
  padding: 12px 17px;
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastin 0.25s ease;
  max-width: calc(100vw - 32px);
  overflow-wrap: anywhere;
}
.toast-dot {
  width: 7px;
  height: 7px;
  background: #96aa8e;
  border-radius: 50%;
  flex-shrink: 0;
}
@keyframes toastin {
  from {
    transform: translateY(-10px);
    opacity: 0;
  }
}
dialog {
  border: 0;
  padding: 0;
  box-shadow: var(--shadow);
  background: #f6f3eb;
  width: min(560px, calc(100% - 30px));
}
dialog::backdrop {
  background: rgba(24, 28, 23, 0.55);
  backdrop-filter: blur(3px);
}
.dialog form {
  padding: 38px;
  display: grid;
  gap: 18px;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
}
.dialog-head small {
  font-size: 8px;
  letter-spacing: 0.2em;
  color: var(--rust);
}
.dialog h2 {
  font-size: 34px;
  margin: 7px 0;
}
.dialog p {
  font:
    13px Georgia,
    serif;
  color: var(--muted);
}
.dialog-close {
  border: 0;
  background: transparent;
  font-size: 25px;
  cursor: pointer;
  align-self: start;
  min-width: 44px;
  min-height: 44px;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.check-row input {
  width: 15px;
  height: 15px;
  accent-color: var(--ink);
  flex-shrink: 0;
}
@media (max-width: 720px) {
  .wrap {
    width: min(100% - 30px, 1180px);
  }
  .hide-mobile {
    display: none;
  }
  .dialog form {
    padding: 25px;
  }
}
.btn-disabled {
  border-color: var(--line);
  background: #e8e6df;
  color: #8d8d88;
  cursor: not-allowed;
}
.btn-disabled:hover {
  transform: none;
}
[hidden] {
  display: none !important;
}
.btn-danger {
  border-color: #8a382b;
  color: #7b2f24;
  background: transparent;
}
.eyebrow,
.form-error {
  overflow-wrap: anywhere;
}
input,
textarea,
select {
  max-width: 100%;
  min-width: 0;
}
fieldset {
  min-width: 0;
}
:where(a, button, summary):focus-visible {
  outline: 3px solid var(--rust);
  outline-offset: 3px;
}
dialog:not(.photo-viewer) {
  max-height: calc(100dvh - 32px);
  overflow: auto;
}
.dialog-head > div {
  min-width: 0;
}
@media (max-width: 720px) {
  input,
  select,
  textarea {
    font-size: 16px;
  }
  label {
    font-size: 12px;
  }
  .check-row {
    min-height: 44px;
  }
  .field-row {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
