/* ═══════════════════════════════════════════════════════════════════════════
   MARBLELENS · ACCOUNT
   Sign up / log in belong to this world (§29): a sheet of MarbleLens paper
   placed on the page, not a white SaaS modal dropped on top of it. The fields
   are ordinary labelled inputs — a password manager, a screen reader and a
   keyboard all see exactly what they expect.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── header account actions · quieter than the brand line (§23) ───────────*/
.nav-account { display: flex; align-items: center; gap: clamp(0.5rem, 1.2vw, 1rem); }
.acct-link {
  border: 0; background: none; cursor: pointer; padding: 0.4em 0.1em;
  font-family: var(--mono); font-size: var(--t-label);
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--graphite);
  transition: color var(--dur-fast) var(--ease-out);
}
.acct-link:hover { color: var(--ink); }
.acct-primary { color: var(--ink); }
.acct-primary::after {
  content: ""; display: block; height: 1px; margin-top: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur-fast) var(--ease-out);
}
.acct-primary:hover::after { transform: scaleX(1); }
/* below 900px the account pair folds into the menu sheet, where it has room to
   be a real touch target instead of two cramped words beside CREATE */
@media (max-width: 900px) { .nav-account { display: none; } }
.nav-sep { display: block; height: 1px; background: var(--line); margin: 0.4rem 0; }
.nav-links .acct-link {
  display: flex; align-items: center;      /* same 44px floor as the links */
  min-height: 44px; padding: 0 0.6em; border-radius: 4px; text-align: left;
}
.nav-links .acct-link:hover { background: var(--paper-deep); }

/* ── product entry · the chapter is enterable ────────────────────────────*/
.enter { margin-top: var(--s-5); }
.btn-enter {
  display: inline-flex; align-items: center; gap: 0.7em;
  padding: 0.8em 1.3em; cursor: pointer;
  font-family: var(--sans); font-weight: 600; font-size: var(--t-small);
  color: var(--ink); background: var(--paper-hi);
  border: 1px solid var(--accent); border-radius: var(--radius-sm);
  box-shadow: var(--sh-pin);
  transition: transform var(--dur-fast) var(--ease-mount),
              box-shadow var(--dur-fast) var(--ease-out),
              background var(--dur-fast);
}
.btn-enter:hover { transform: translateY(-2px); box-shadow: var(--sh-mount); background: var(--paper); }
.btn-enter:active { transform: translateY(0) scale(0.985); }
.btn-enter .arr { transition: transform var(--dur-fast) var(--ease-out); }
.btn-enter:hover .arr { transform: translateX(3px); }

/* the conclusion of the website proof */
.build-handoff { margin-top: var(--s-7); text-align: center; }
.btn-lg { padding: 1em 1.7em; font-size: var(--t-body); }

/* ── THE SHEET ───────────────────────────────────────────────────────────*/
dialog.auth {
  padding: 0; border: 0; background: transparent;
  max-width: min(30rem, calc(100vw - 2rem));
  color: var(--ink-2);
}
dialog.auth::backdrop {
  background: rgba(31, 31, 28, 0.42);
  backdrop-filter: blur(3px);
}
.auth-sheet {
  position: relative;
  display: grid; gap: var(--s-3);
  padding: clamp(1.5rem, 4vw, 2.4rem);
  background: var(--paper-hi);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--sh-lift);
  /* placed, with a little weight — the same physics as every other sheet */
  animation: authPlace 0.32s steps(4, end);
}
@keyframes authPlace {
  from { opacity: 0; transform: translateY(-14px) scale(1.02); }
  to   { opacity: 1; transform: none; }
}
.auth-mark {
  font-family: var(--serif); font-weight: 700;
  font-size: 0.72rem; letter-spacing: 0.22em; color: var(--graphite-2);
}
.auth-h { font-family: var(--serif); font-size: var(--t-h3); color: var(--ink); }
.auth-intent {
  font-family: var(--mono); font-size: var(--t-label);
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-ink);
  margin-top: -0.4rem;
}
.auth-intent b { font-weight: 600; }

.auth-field { display: grid; gap: 0.35em; margin-top: var(--s-2); }
.auth-field label {
  font-family: var(--mono); font-size: var(--t-label);
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--graphite);
}
.auth-field input {
  font: inherit; font-size: var(--t-body); color: var(--ink);
  padding: 0.75em 0.9em; width: 100%;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-sm); box-shadow: var(--sh-press);
}
.auth-field input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: var(--sh-press), 0 0 0 3px var(--accent-wash);
}
.auth-hint { font-size: 0.78rem; color: var(--graphite-2); }
.auth-err { min-height: 1.2em; font-size: var(--t-small); color: var(--red); }

.auth-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-2); }
.auth-seam {
  margin-top: var(--s-3); padding-top: var(--s-3);
  border-top: 1px dashed var(--graphite-2);
  font-size: var(--t-small); color: var(--graphite);
}
.auth-x {
  position: absolute; top: 10px; right: 12px;
  border: 0; background: none; cursor: pointer;
  font-size: 0.9rem; line-height: 1; color: var(--graphite-2); padding: 0.4em;
}
.auth-x:hover { color: var(--ink); }

/* ── FOOTER · two-column now that the site is two products ───────────────*/
.footer-grid.two { grid-template-columns: minmax(0, 1.7fr) repeat(2, minmax(0, 1fr)); }
.footer-mail { display: inline-block; margin-top: var(--s-3); font-size: var(--t-small); }
.footer-col .acct-link { text-align: left; padding: 0; font-family: var(--sans);
  font-size: var(--t-small); letter-spacing: 0; text-transform: none; color: var(--ink-2); }
.footer-col .acct-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 780px) { .footer-grid.two { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 440px) { .footer-grid.two { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  .auth-sheet { animation: none; }
  .btn-enter, .acct-link, .acct-primary::after { transition: none; }
}

/* One readable account sheet across the homepage and both workspaces. */
body.u-night dialog.auth{
 --ink:#f4efe4;--ink-2:#dcd5c6;--graphite:#b4b0a7;--graphite-2:#aaa69e;
 --paper:#111416;--paper-hi:#090c0f;--line:#34383b;--accent:#c9a257;
 --accent-ink:#e8c57e;--accent-wash:rgba(201,162,87,.15);--red:#ffb3a7;
 --s-2:12px;--s-3:20px;--radius:20px;--radius-sm:9px;
 --t-body:16px;--t-small:14px;--t-label:12px;--t-h3:30px;
 width:480px;font-family:var(--sans,Inter,sans-serif);line-height:1.5;
}
body.u-night .auth-sheet{animation:authPlace .35s ease-out}
body.u-night .auth-field input{box-sizing:border-box;min-height:48px}
body.u-night .auth-x{min-width:44px;min-height:44px}
body.u-night .auth-actions .btn.accent{background:#c9a257;color:#030405;min-height:46px;border:1px solid #c9a257}
body.u-night .auth-actions .btn.ghost{color:#f4efe4;min-height:46px;border:1px solid #454849;background:transparent}
body.u-night .auth-actions .btn:focus-visible{outline:2px solid #e8c57e;outline-offset:4px}
#drawer .dcta button{min-height:48px;font:500 1rem var(--sans);width:100%}

/* Keep account controls and long email addresses usable on every surface. */
[data-auth][hidden] { display: none !important; }
.auth-account-email { overflow-wrap: anywhere; }

/* Account feedback stays readable and all controls remain touch-sized. */
.auth-password-toggle,.auth-help-toggle{color:var(--gold,#d9b970);background:transparent;border:0;padding:8px 0;min-height:44px;font:inherit;text-align:left;cursor:pointer}
.auth-password-toggle:focus-visible,.auth-help-toggle:focus-visible{outline:2px solid currentColor;outline-offset:3px}
.auth-help{font-size:.9rem;line-height:1.6;border-left:2px solid #d9b970;padding:0 14px;margin:8px 0 18px}
.auth-help a{text-decoration:underline;color:inherit}
.auth [data-connected-preview]{margin:8px 0}
.auth [value="go"]:disabled{opacity:.55;cursor:wait}
.auth-err:empty,.auth-notice:empty{display:none}
/* Shared product pages use the same compact, readable account dialog. */
dialog.auth{max-height:calc(100dvh - 32px);overflow:auto;overscroll-behavior:contain}
.auth .auth-sheet{gap:14px;padding:28px 24px}
.auth .auth-field{margin:0;gap:7px}
.auth .auth-field input{min-height:46px;font-size:16px}
.auth .auth-actions{gap:9px}
.auth .btn{min-height:44px;padding:10px 16px;font:500 14px/1.4 var(--sans);letter-spacing:0;text-transform:none;border-radius:9px}
.auth .btn.ghost{background:transparent;color:inherit;border:1px solid #ffffff30}
.auth .auth-h{margin:0 0 8px}
.auth .auth-notice{margin:0;font-size:13px;line-height:1.6}
.auth .auth-password-toggle{padding:2px 0;min-height:38px;font-size:13px}
.auth .auth-seam{margin:6px 0 0;padding-top:14px;font:12px/1.6 var(--sans)}

.auth [hidden]{display:none!important}
.auth-account-links{display:grid;grid-template-columns:1fr 1fr;gap:5px 12px;margin:20px 0}
.auth-account-links a{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:44px;padding:9px 10px;color:#d8e2ce;border:1px solid #ffffff15;border-radius:8px;text-decoration:none;font:12px var(--sans)}
.auth-account-links a:hover{background:#d2f86a0c;border-color:#d2f86a55}.auth-account-links a span{color:#d2f86a}
@media(max-width:440px){.auth-account-links{grid-template-columns:1fr}.auth-account-links a{font-size:13px}}
