/* ═══════════════════════════════════════════════════════════════════
   BlogVault app auth + contact pages
   Mirrors blogvault.net (~/bvnet src/styles/global.css + contact.css):
   white paper, sage field, forest chamfered plates, one lemon signal,
   Stack Sans Headline display / Inter body / Geist Mono labels and buttons,
   square geometry (radius only on buttons and pills), hairlines, no shadows.
   Everything is scoped to .bva-page so Bootstrap 3 in the users layout
   cannot leak in. Shared by sign-in, sign-up, password and contact views.
   ═══════════════════════════════════════════════════════════════════ */


.bva-page {
  --ink: #090F05; --forest: #18280E; --sage: #F4FAED; --sage-2: #EEF5E4;
  --olive: #5B7A2E; --lemon: #B2EB76; --hair: #D8E5CA; --field-line: #CDDCBC;
  --body: rgba(9, 15, 5, .80); --mute: rgba(9, 15, 5, .58);
  --danger-bg: #FBEAE5; --danger: #7A1F0C;
  --display: "Stack Sans Headline", "Inter", ui-sans-serif, system-ui, sans-serif;
  --sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --cut: 17px; --t: 250ms; --e: cubic-bezier(.4, 0, .2, 1);

  position: relative;
  min-height: 100vh;
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
.bva-page *, .bva-page *::before, .bva-page *::after { box-sizing: border-box; }
.bva-page :where(h1, h2, h3, p, ul, dl, dd) { margin: 0; }
.bva-page :where(ul) { padding: 0; list-style: none; }
.bva-page img, .bva-page svg { display: block; max-width: 100%; }
.bva-page a { color: inherit; text-decoration: none; }
.bva-page ::selection { background: var(--lemon); color: var(--ink); }
.bva-page :focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ─── type ─── */
.bva-page :is(h1, h2) { font-family: var(--display); font-weight: 600; color: var(--ink); text-wrap: balance; }
.bva-h1 { font-size: clamp(36px, 4vw, 52px); line-height: 1.02; letter-spacing: -.04em; }
.bva-h2 { font-size: clamp(22px, 2.4vw, 28px); line-height: 1.22; letter-spacing: -.03em; }
.bva-h3 { font-family: var(--display); font-size: 20px; font-weight: 600; line-height: 1.25; letter-spacing: -.02em; }
.bva-g { background: linear-gradient(90deg, #2E4A14, #6E9A34); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; padding-bottom: .12em; margin-bottom: -.12em; }
.bva-lead { font-size: 17px; line-height: 1.55; color: var(--body); text-wrap: pretty; }
.bva-body { font-size: 15px; line-height: 1.55; color: var(--body); text-wrap: pretty; }
.bva-small { font-size: 14px; line-height: 1.45; color: var(--mute); }
.bva-eyebrow { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); opacity: .8; }
.bva-kicker { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 14px; font-weight: 520; color: var(--olive); }
.bva-tag { display: inline-flex; align-items: center; height: 26px; padding: 0 12px; border-radius: 999px; background: var(--forest); color: var(--lemon); font-size: 13px; }

/* ─── buttons: mono, 6px radius, lemon on hover ─── */
.bva-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border: 0; background: none; isolation: isolate; cursor: pointer;
  font-family: var(--mono); font-size: 14px; font-weight: 500; letter-spacing: -.02em; line-height: 1.3;
  color: var(--ink); white-space: nowrap; text-decoration: none;
  transition: color var(--t) var(--e);
}
.bva-btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 6px;
  background: #fff; border: 1px solid rgba(9, 15, 5, .16);
  transition: background-color var(--t) var(--e), border-color var(--t) var(--e), transform var(--t) var(--e);
}
.bva-btn:hover::before { background: var(--lemon); border-color: var(--lemon); transform: scale(.98); }
.bva-page a.bva-btn:hover, .bva-btn:hover { color: var(--ink); }
.bva-btn--ink, .bva-page a.bva-btn--ink { color: var(--lemon); }
.bva-btn--ink::before { background: var(--forest); border-color: var(--forest); }
.bva-btn--block { display: flex; width: 100%; }
.bva-btn--sm { min-height: 38px; padding: 9px 14px; font-size: 13px; }
.bva-btn svg { width: 16px; height: 16px; flex: none; }
.bva-btn:disabled, .bva-btn[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }
.bva-btn:disabled:hover::before { background: var(--forest); border-color: var(--forest); transform: none; }
.bva-btn--ink:disabled:hover { color: var(--lemon); }
.bva-google-icon { width: 18px; height: 18px; }

/* ─── page rulers (the site's signature marginalia), wide screens only ─── */
.bva-rule {
  position: absolute; top: 0; bottom: 0; width: 18px; pointer-events: none; opacity: .9; z-index: 2;
  background:
    linear-gradient(180deg, var(--ink) 1px, transparent 1px) 0 0 / 10px 8px repeat-y,
    linear-gradient(180deg, var(--ink) 1px, transparent 1px) 0 0 / 18px 40px repeat-y;
}
.bva-rule--l { left: 12px; }
.bva-rule--r { right: 12px; transform: scaleX(-1); }
@media (max-width: 1180px) { .bva-rule { display: none; } }

/* ─── top bar ─── */
.bva-bar { background: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; padding: 0 clamp(20px, 4vw, 56px); }
.bva-logo img { height: 26px; width: auto; max-width: none; }
.bva-bar-links { display: flex; align-items: center; gap: 10px; }
.bva-bar-link { font-size: 15px; color: var(--body); transition: color var(--t) var(--e); }
.bva-bar-link:hover { color: var(--ink); }

/* react.css (users layout) sets a { text-decoration: none !important }, so underlines need !important */
.bva-links a, .bva-terms a, .bva-hint a, .bva-page .alert a, .bva-label-row a:hover { text-decoration: underline !important; text-underline-offset: 3px; }

/* ─── forms ─── */
.bva-form { display: grid; gap: 18px; }
.bva-field { min-width: 0; }
.bva-field > label, .bva-attach > label {
  display: block; margin: 0 0 8px; font-family: var(--mono); font-size: 12px; font-weight: 400;
  letter-spacing: .06em; text-transform: uppercase; color: var(--ink);
}
.bva-page .bva-field :is(input, select, textarea) {
  display: block; width: 100%; min-height: 46px; margin: 0; padding: 11px 13px;
  border: 1px solid var(--field-line); border-radius: 0; background: #fff; box-shadow: none;
  font: 15px/1.5 var(--sans); color: var(--ink);
  transition: border-color var(--t) var(--e);
}
.bva-page .bva-field :is(input, select, textarea):hover { border-color: #AFC596; }
.bva-page .bva-field :is(input, select, textarea):focus-visible { outline: 2px solid var(--forest); outline-offset: 1px; border-color: var(--forest); }
.bva-page .bva-field :is(input, textarea)::placeholder { color: var(--mute); }
.bva-page .bva-field textarea { min-height: 150px; resize: vertical; }
.bva-page .bva-field select {
  appearance: none; -webkit-appearance: none; padding-right: 40px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23090F05' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat right 14px center / 10px 6px;
}
.bva-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.bva-input-wrap { position: relative; }
.bva-page .bva-input-wrap input { padding-right: 48px; }
.bva-page .bva-input-wrap input.bva-otp-input { padding-right: 116px; }
.bva-toggle {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; background: none;
  color: var(--mute); cursor: pointer; transition: color var(--t) var(--e);
}
.bva-toggle:hover, .bva-toggle[aria-pressed="true"] { color: var(--ink); }
.bva-toggle svg { width: 18px; height: 18px; }
.bva-resend {
  position: absolute; top: 50%; right: 12px; transform: translateY(-50%);
  padding: 4px 0; border: 0; background: none; cursor: pointer;
  font-family: var(--mono); font-size: 12px; color: var(--olive); text-decoration: underline; text-underline-offset: 3px;
}
.bva-resend:disabled { opacity: .6; cursor: progress; }
.bva-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.bva-label-row > label { margin: 0 0 8px; font-family: var(--mono); font-size: 12px; font-weight: 400; letter-spacing: .06em; text-transform: uppercase; }
.bva-label-row a { font-size: 13px; color: var(--olive); }
.bva-hint { margin-top: 8px; font-size: 13px; line-height: 1.55; color: var(--mute); overflow-wrap: anywhere; }
.bva-hint:empty { display: none; }
/* the users layout fills .bv-signup-form-error-msg from window.errors */
.bva-page .bv-signup-form-error-msg { display: block; margin-top: 6px; font-size: 13px; color: var(--danger); }
.bva-page .bv-signup-form-error-msg:empty { display: none; }
.bva-page .bv-form-error input { border-color: var(--danger); }

.bva-or { display: flex; align-items: center; gap: 14px; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.bva-or::before, .bva-or::after { content: ""; flex: 1; height: 1px; background: var(--hair); }

/* ─── alerts (flash) ─── */
.bva-page .alert {
  margin: 0; padding: 12px 14px; border: 0; border-left: 3px solid var(--olive); border-radius: 0;
  background: var(--sage); font-size: 14px; line-height: 1.5; color: var(--ink); text-align: left;
}
.bva-page .alert-danger { border-left-color: var(--danger); background: var(--danger-bg); color: var(--danger); }
.bva-status strong { font-weight: 600; }
.bva-status-sub { display: block; margin-top: 4px; font-size: 13px; opacity: .85; }
.bva-page .alert:focus { outline: none; }
.bva-page .alert:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
#flash-container:empty { display: none; }

/* ═══ auth split: form on paper, the reading on a sage field ═══ */
.bva-auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.bva-auth-left { display: flex; flex-direction: column; min-width: 0; }
.bva-auth-left .bva-bar { padding-left: clamp(20px, 5vw, 72px); }
.bva-auth-main { flex: 1; display: flex; flex-direction: column; justify-content: center; width: 100%; max-width: 520px; margin: 0 auto; padding: 32px clamp(20px, 5vw, 48px) 56px; gap: 24px; }
.bva-auth-head { display: grid; gap: 16px; }
.bva-auth-head .bva-h1 { margin-top: 4px; }
.bva-links { display: grid; gap: 10px; padding-top: 20px; border-top: 1px solid var(--hair); font-size: 14px; color: var(--body); }
.bva-links a { color: var(--ink); font-weight: 500; text-decoration-color: var(--olive); }
.bva-links a:hover { color: var(--olive); }
.bva-terms { font-size: 13px; line-height: 1.55; color: var(--mute); }

.bva-auth-right {
  position: relative; display: flex; align-items: center; justify-content: center; min-width: 0;
  margin: 12px 12px 12px 0; padding: clamp(40px, 5vw, 72px) clamp(28px, 4vw, 64px); overflow: hidden;
  background: linear-gradient(180deg, var(--sage-2) 0%, var(--sage-2) 70%, var(--sage) 100%);
  clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut));
}
.bva-auth-right::before {
  content: ""; position: absolute; left: 50%; top: -30%; width: 900px; height: 600px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(178, 235, 118, .45), transparent); pointer-events: none;
}
.bva-reading { position: relative; width: 100%; max-width: 480px; display: grid; gap: 22px; }
.bva-reading > .bva-h2 { font-size: clamp(26px, 2.8vw, 36px); line-height: 1.1; letter-spacing: -.035em; }

/* the forest plate: a log of one night's backup, chamfered */
.bva-plate {
  --cut: 17px; padding: 22px 24px 24px; background: var(--forest); color: #fff;
  clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut));
}
.bva-plate-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid rgba(255, 255, 255, .14); font-family: var(--mono); font-size: 12px; color: rgba(255, 255, 255, .7); }
.bva-live { display: inline-flex; align-items: center; gap: 8px; color: var(--lemon); }
.bva-live::before { content: ""; width: 7px; height: 7px; background: var(--lemon); }
.bva-log { display: grid; gap: 0; }
.bva-log li { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 14px; padding: 13px 0; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.bva-log li:last-child { border-bottom: 0; padding-bottom: 4px; }
.bva-log time, .bva-log .bva-log-k { font-family: var(--mono); font-size: 12px; line-height: 1.6; color: rgba(255, 255, 255, .58); }
.bva-log b { display: block; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: #fff; }
.bva-log span { display: block; margin-top: 3px; font-size: 14px; line-height: 1.45; color: rgba(255, 255, 255, .78); }
.bva-log .is-on b { color: var(--lemon); }
.bva-bar-seg { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; margin-top: 16px; }
.bva-bar-seg i { height: 6px; background: var(--lemon); }
.bva-bar-seg i:nth-child(n+11) { background: rgba(255, 255, 255, .16); }
.bva-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--hair); }
.bva-facts li { padding: 14px 12px 0 0; }
.bva-facts b { display: block; font-family: var(--display); font-size: 22px; font-weight: 600; letter-spacing: -.03em; color: var(--ink); }
.bva-facts span { display: block; margin-top: 2px; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }

@media (max-width: 960px) {
  .bva-auth { grid-template-columns: 1fr; }
  .bva-auth-right { display: none; }
  .bva-auth-main { justify-content: flex-start; padding-top: 24px; }
}
@media (max-width: 560px) {
  .bva-field-row { grid-template-columns: 1fr; gap: 18px; }
  .bva-bar-link--wide { display: none; }
}

/* ─── modal: Google account not found ─── */
.bva-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; background: rgba(9, 15, 5, .45); backdrop-filter: blur(6px); }
.bva-modal-box {
  --cut: 17px; width: 100%; max-width: 460px; display: grid; gap: 16px; padding: 32px; background: #fff;
  clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut));
}
.bva-modal-box:focus { outline: none; }
.bva-modal-actions { display: flex; gap: 12px; }
.bva-modal-actions > * { flex: 1; }
.bva-modal-actions form { margin: 0; display: flex; }
.bva-modal-actions .bva-btn { width: 100%; }

/* ═══ contact page: mirrors blogvault.net/contact ═══ */
.bva-contact-main {
  position: relative; margin-inline: 44px; padding: clamp(56px, 7vw, 96px) 0 clamp(72px, 9vw, 120px); overflow: hidden;
  background: linear-gradient(180deg, var(--sage-2) 0%, var(--sage-2) 70%, #fff 100%);
  clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%, 0 var(--cut));
}
.bva-contact-main::before { content: ""; position: absolute; left: 50%; top: -40%; width: min(1100px, 120vw); height: 640px; transform: translateX(-50%); pointer-events: none; background: radial-gradient(closest-side, rgba(178, 235, 118, .45), transparent); }
.bva-wrap { width: 100%; max-width: min(1360px, 100% - 128px); margin-inline: auto; padding-inline: 24px; }
.bva-contact-grid { position: relative; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.bva-contact-title { margin-top: 22px; font-size: clamp(40px, 6.2vw, 80px); line-height: .98; letter-spacing: -.048em; }
.bva-contact-lead { margin-top: 22px; max-width: 36ch; font-size: 18px; }
.bva-contact-note { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--hair); }
.bva-contact-note .bva-h3 { margin: 12px 0 10px; }
.bva-contact-note .bva-small { margin-top: 12px; }
.bva-hours { margin: 14px 0 12px; display: grid; gap: 8px; }
.bva-hours div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 14px; background: rgba(255, 255, 255, .7); font-size: 15px; }
.bva-hours dt { font-weight: 400; color: var(--body); }
.bva-hours dd { font-family: var(--mono); font-size: 14px; color: var(--ink); }
.bva-mail { display: inline-block; margin: 10px 0 8px; font-family: var(--display); font-size: 22px; letter-spacing: -.02em; color: var(--ink); border-bottom: 1px solid var(--olive); }
.bva-page a.bva-mail:hover { color: var(--olive); }

.bva-panel { position: relative; }
.bva-panel::before {
  content: ""; position: absolute; inset: -1px; background: var(--hair);
  clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut));
}
.bva-panel-in {
  position: relative; background: #fff; padding: clamp(24px, 3vw, 40px);
  clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut));
}
.bva-panel-head { display: flex; align-items: center; gap: 16px; padding-bottom: 22px; margin-bottom: 26px; border-bottom: 1px solid var(--hair); }
.bva-panel-head .bva-small { margin-top: 6px; }
.bva-env { display: grid; place-items: center; width: 48px; height: 48px; flex: none; background: var(--forest); color: var(--lemon); }
.bva-env svg { width: 26px; height: 26px; }
.bva-contact-form { gap: 20px; }
.bva-attach { padding: 16px; border: 1px dashed #B9CFA2; background: var(--sage); }
.bva-attach > label span { margin-left: 6px; font-family: var(--sans); letter-spacing: 0; text-transform: none; color: var(--mute); }
.bva-attach input[type=file] { width: 100%; font: 13px var(--sans); color: var(--body); }
.bva-attach input::file-selector-button { margin-right: 12px; padding: 8px 12px; border: 1px solid var(--forest); border-radius: 0; background: #fff; font: 500 12px var(--mono); color: var(--forest); cursor: pointer; }
.bva-attach button { margin-top: 8px; padding: 0; border: 0; background: none; font-size: 13px; color: var(--danger); text-decoration: underline; cursor: pointer; }
.bva-contact-submit { justify-self: start; min-width: 180px; }

.bva-contact-more { padding-block: clamp(72px, 8vw, 112px); }
.bva-contact-more .bva-h2 { margin-top: 12px; font-size: clamp(28px, 3.4vw, 40px); }
.bva-more-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 36px; }
.bva-more-links a { display: block; height: 100%; }
.bva-more-links a > span { display: grid; gap: 8px; height: 100%; padding: 24px; background: #fff; transition: background var(--t) var(--e); }
.bva-page .bva-more-links a:hover > span { background: var(--sage); }
.bva-more-links b { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.bva-more-links b svg { width: 18px; height: 18px; transition: transform var(--t) var(--e); }
.bva-more-links a:hover b svg { transform: translateX(3px); }

@media (max-width: 960px) {
  .bva-contact-grid { grid-template-columns: 1fr; gap: 0; }
  .bva-more-links { grid-template-columns: 1fr; }
  /* On one column the form follows the heading, before the reference notes. */
  .bva-contact-intro { display: contents; }
  .bva-contact-intro > .bva-contact-note { order: 2; }
  .bva-panel { order: 1; margin-top: 32px; }
}
@media (max-width: 720px) {
  .bva-contact-main { margin-inline: 12px; }
  .bva-wrap { max-width: 100%; padding-inline: 18px; }
}
