@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f5f0e6;
  --paper: #fffdf9;
  --ink: #1e2433;
  --muted: #606675;
  --line: #e2dcd0;
  --accent: #2c4a42;
  --accent-hover: #213a33;
  --brass: #a87628;
  --soft: #eef2ec;
  --danger: #a1382f;
  --sans: "Instrument Sans", "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --serif: "Newsreader", Georgia, serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  line-height: 1.6;
  background:
    radial-gradient(900px 420px at 50% -120px, rgba(168, 118, 40, 0.08), transparent 70%),
    var(--bg);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-underline-offset: 4px; }
button, input { font: inherit; }
button, a, input, summary { -webkit-tap-highlight-color: transparent; }
button, a, summary { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: 0.48; }
[hidden] { display: none !important; }

a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible {
  outline: 2.5px solid #8aab9d;
  outline-offset: 3px;
}

p { margin: 0 0 12px; }
h1, h2, h3 { margin: 0; font-weight: 500; }
h1, h2 { font-family: var(--serif); }
h1 { font-size: clamp(27px, 4vw, 32px); line-height: 1.24; letter-spacing: -0.015em; }
h2 { font-size: 21px; line-height: 1.3; }
h3 { font-size: 13px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; color: var(--muted); }

.site-header {
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 36px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 500 20px/1.2 var(--serif);
  letter-spacing: 0.01em;
  text-decoration: none;
}

.brand-mark {
  width: 22px;
  height: 22px;
  flex: none;
}

.header-label {
  border-left: 1px solid #cfc9bc;
  padding-left: 16px;
  color: var(--muted);
  font-size: 12.5px;
  letter-spacing: 0.04em;
}

.account-layout {
  max-width: 496px;
  width: 100%;
  flex: 1;
  margin: 0 auto;
  padding: 26px 20px 44px;
}

.is-management .account-layout { max-width: 560px; }

.account-card {
  position: relative;
  background: var(--paper);
  border: 1px solid #e5dfd3;
  border-radius: 18px;
  padding: 0 34px 34px;
  box-shadow: 0 14px 42px rgba(34, 31, 22, 0.055);
  overflow: hidden;
}

.foyer-arc {
  margin: 0 -34px 20px;
  height: 66px;
  background: linear-gradient(180deg, rgba(168, 118, 40, 0.055) 0%, rgba(255, 253, 249, 0) 100%);
  border-bottom: 1px solid rgba(226, 220, 208, 0.55);
}

.foyer-arc svg {
  width: 100%;
  height: 100%;
  display: block;
}

.loading {
  padding: 28px 0;
  color: var(--muted);
  font-size: 14px;
}

.introduction { margin-bottom: 24px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 0 0 12px;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  background: #f4efe4;
}

.context-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brass);
}

.intro-copy {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
  margin: 10px 0 0;
}

.muted { color: var(--muted); font-size: 13px; }

.auth-form, .sub-form {
  display: grid;
  gap: 13px;
}

.field-group {
  display: grid;
  gap: 6px;
}

label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}

input {
  min-width: 0;
  width: 100%;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #d7d1c4;
  border-radius: 10px;
  padding: 12px 14px;
  line-height: 1.4;
  font-size: 15.5px;
  transition: border-color 0.15s;
}

input:focus { border-color: var(--accent); }
input::placeholder { color: #9094a0; }

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 11px 18px;
  border: 1px solid #cfcabd;
  border-radius: 10px;
  text-decoration: none;
  line-height: 1.4;
  font-size: 14.5px;
  font-weight: 500;
  background: transparent;
  color: var(--ink);
  width: 100%;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.button.primary:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.button.danger {
  border-color: #c9a69a;
  color: var(--danger);
  margin-top: 4px;
}

.text-button {
  border: 0;
  background: none;
  padding: 6px 0;
  font-size: 13px;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.mode-switch {
  margin-top: 14px;
  text-align: center;
}

.sent-stage {
  background: #f6f2e8;
  border: 1px solid #e6decb;
  border-radius: 12px;
  padding: 18px 20px;
}

.sent-badge {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 6px;
}

.sent-copy {
  font-size: 14px;
  line-height: 1.65;
  margin: 0 0 12px;
}

.sent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.privacy-note {
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
  margin: 4px 0 0;
}

.form-status, .page-status {
  font-size: 13px;
  color: var(--danger);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.form-status.is-ok, .page-status.is-ok { color: var(--accent); }
.form-status:empty, .page-status:empty { display: none; }
.page-status { margin: 16px 0 0; }

.notice {
  font-size: 13px;
  color: var(--muted);
  background: #f4f0e7;
  border-radius: 9px;
  padding: 12px 14px;
  margin: 12px 0;
}

.profile {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding: 14px 16px;
  background: #f5f1e8;
  border: 1px solid #e8e1d3;
  border-radius: 12px;
}

.profile-mark {
  flex: none;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: #ebe2ce;
  color: #5c4b23;
  border-radius: 50%;
  font: 500 18px var(--serif);
}

.profile h2 {
  font: 500 15.5px var(--sans);
  overflow-wrap: anywhere;
}

.profile .muted { margin: 2px 0 0; font-size: 12px; }

.continue-section {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

.continue-section .text-button { justify-self: center; }

.security-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.security-section h3, .products h3 { margin-bottom: 10px; }

.method-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  font-size: 13.5px;
}

.inline-details {
  margin-top: 8px;
  font-size: 13px;
  color: var(--accent);
}

.inline-details summary {
  cursor: pointer;
  padding: 4px 0;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.inline-details .sub-form {
  margin-top: 12px;
  padding: 14px;
  background: #f8f5ee;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
}

.products {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.product-list { display: grid; gap: 6px; }

.product-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 13px 14px;
  margin: 0 -14px;
  border-radius: 11px;
  text-decoration: none;
  transition: background 0.15s;
}

.product-link:hover { background: #f6f2e9; }

.product-link strong {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  display: block;
}

.product-link small {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 2px;
}

.product-coming {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  padding: 12px 0;
  border-top: 1px solid #eeebe4;
  font-size: 14px;
}

.product-coming strong {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  opacity: 0.72;
  display: block;
}

.product-coming small { font-size: 12px; display: block; margin-top: 2px; }
.product-pill {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f1ece1;
  color: var(--muted);
  white-space: nowrap;
}

.account-actions {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.account-actions > details { font-size: 12.5px; color: var(--muted); }
.account-actions summary { padding: 6px 0; cursor: pointer; }
.account-actions > details[open] { width: 100%; }

.delete-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 18px;
  background: #faf2ed;
  border: 1px solid #ead4c9;
  border-radius: 11px;
}

.delete-form p { font-size: 12.5px; color: #7c5e55; margin: 0; }
.delete-form h3 { color: #773f34; text-transform: none; letter-spacing: 0; font-size: 15px; }

.back-product {
  display: flex;
  width: fit-content;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  padding: 14px 0;
  margin: 8px auto 0;
}

.back-product:hover { color: var(--ink); }

.error-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.site-footer {
  max-width: 1080px;
  width: 100%;
  padding: 20px 36px 28px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  color: #7c7d78;
  font-size: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

.privacy-document {
  max-width: 720px;
  padding: 28px 36px 64px;
  margin: 0 auto;
  font-size: 15px;
  line-height: 1.8;
}

.privacy-document h1 { font-size: 32px; margin: 10px 0 14px; }
.privacy-document h2 { font-size: 21px; margin: 28px 0 10px; }

@media (max-width: 680px) {
  .site-header { padding: 18px 20px; }
  .account-layout { padding: 14px 16px 32px; }
  .account-card { padding: 0 22px 26px; border-radius: 16px; }
  .foyer-arc { margin: 0 -22px 16px; height: 54px; }
  .site-footer { padding: 14px 20px 24px; flex-direction: column; gap: 6px; }
}
