/* Palette, caratteri e pillole della home; le pagine restano leggibili senza animazioni. */
:root {
  color-scheme: dark;
  --canvas: #0B1430; --surface-1: #131F47; --surface-2: #1A2957;
  --ink: #F2F2EC; --ink-muted: #A7B5DC; --focus: #4CC2FF; --night: #0F1A3A;
  --hairline: rgba(242, 242, 236, 0.1);
  font-family: "Archivo", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  font-size: 16px; line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  min-height: 100vh; min-height: 100dvh; margin: 0; display: flex; flex-direction: column;
  background: radial-gradient(110% 75% at 50% 0%, var(--surface-1), var(--canvas) 70%);
  color: var(--ink);
}
a { color: inherit; text-underline-offset: 3px; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.site-header { padding: max(24px, env(safe-area-inset-top)) max(20px, 5vw) 24px; }
.wordmark { font-weight: 900; font-stretch: 125%; font-size: 21px; letter-spacing: -0.03em; text-decoration: none; }
.page { flex: 1; display: grid; align-items: center; padding: 32px 20px 64px; }
.account-card {
  width: min(100%, 580px); min-width: 0; margin-inline: auto; padding: clamp(24px, 5vw, 44px);
  border-radius: 30px; background: var(--surface-1); box-shadow: inset 0 1px 0 var(--hairline);
}
h1 { margin: 0 0 20px; font-size: clamp(38px, 6vw, 56px); font-weight: 650; font-stretch: 118%; letter-spacing: -0.052em; line-height: 0.98; text-wrap: balance; }
p { margin: 0; }
.lead { color: var(--ink-muted); font-size: 18px; letter-spacing: -0.01em; }
.small { color: var(--ink-muted); font-size: 13px; line-height: 1.6; }
.providers { display: grid; gap: 10px; margin-top: 28px; }
.pill {
  display: inline-flex; justify-content: center; align-items: center; min-height: 46px; padding: 12px 20px;
  border: 1px solid transparent; border-radius: 100px; font-size: 15px; font-weight: 600;
  letter-spacing: -0.01em; text-decoration: none; cursor: pointer;
}
.provider, .secondary { background: var(--surface-2); color: var(--ink); }
.provider:hover, .secondary:hover { background: #22316E; }
.provider { display: grid; grid-template-columns: 20px minmax(0, 1fr) 20px; gap: 12px; }
.provider-icon { display: block; width: 20px; height: 20px; grid-column: 1; grid-row: 1; }
.provider [data-copy] { grid-column: 2; grid-row: 1; }
#apple { background: #000; color: #fff; }
#google { background: #fff; color: #1f1f1f; border-color: #747775; }
.provider.remembered { border-color: var(--focus); background: #22316E; }
#apple.remembered, #google.remembered { border-color: var(--focus); box-shadow: 0 0 0 1px var(--focus); }
.primary { background: var(--ink); color: var(--night); }
.primary:hover { background: #fff; }
button:disabled { opacity: 0.55; cursor: wait; }
.method-note { color: var(--focus); font-size: 14px; margin-top: 24px; }
.method-note:not([hidden]) + .providers { margin-top: 12px; }
.terms { margin-block: 24px 12px; }
.email-panel { margin-top: 24px; border-top: 1px solid var(--hairline); padding-top: 24px; }
form { display: grid; gap: 10px; }
label { font-size: 13px; font-weight: 600; }
input {
  width: 100%; min-width: 0; height: 46px; border-radius: 12px; border: 1px solid rgba(242,242,236,0.25);
  background: var(--canvas); padding-inline: 14px;
}
input::placeholder { color: var(--ink-muted); }
#confirm-email { margin-bottom: 16px; }
.text-button { padding: 6px 0; border: 0; background: transparent; font-size: 14px; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
#resend { margin-top: 12px; }
.sign-out { display: block; margin-top: 28px; color: var(--ink-muted); }
.license-label { display: block; margin-top: 28px; margin-bottom: 8px; }
.license-row { display: flex; align-items: center; gap: 10px; }
.license-key { font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace; font-size: 15px; letter-spacing: -0.025em; }
.paste { margin-top: 20px; font-size: 16px; }
/* Nome facoltativo (mock del 15/11/2026): linea sottile sopra, come le notizie. */
.name-panel { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--hairline); min-width: 0; }
.name-form { gap: 8px; }
.name-form label { font-size: 14px; }
.name-row { display: flex; align-items: center; gap: 10px; }
.name-row input { flex: 1 1 auto; min-width: 0; }
/* «Save» e «Saved» occupano lo stesso spazio: il campo non si allarga né si stringe. */
#name-save { flex: 0 0 auto; min-width: 5.75em; }
#name-message { margin-top: 10px; font-size: 13px; }
.news-panel { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--hairline); min-width: 0; }
.news-label { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.5; cursor: pointer; }
.news-label input { flex: 0 0 18px; width: 18px; height: 18px; margin: 2px 0 0; padding: 0; accent-color: var(--focus); }
.news-label input:disabled { cursor: wait; }
.news-label span { min-width: 0; overflow-wrap: anywhere; }
#news-description { margin: 8px 0 0 28px; overflow-wrap: anywhere; }
#news-message { margin: 10px 0 0 28px; font-size: 13px; }
.download { margin-top: 28px; }
.download-details { margin-top: 24px; color: var(--ink-muted); font-size: 14px; }
.requirements { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 6px; }
.requirements li:first-child { color: var(--ink); }
.download-details p + p { margin-top: 12px; }
.message { margin-top: 24px; font-size: 15px; overflow-wrap: anywhere; }
#retry { margin-top: 16px; }
.site-footer { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 20px; padding: 20px 20px max(24px, env(safe-area-inset-bottom)); color: var(--ink-muted); font-size: 13px; }
@media (max-width: 420px) {
  .page { padding-top: 12px; padding-bottom: 32px; }
  .license-row { flex-wrap: wrap; }
  .license-key { flex-basis: 100%; font-size: 16px; }
  .site-footer span { flex-basis: 100%; text-align: center; }
}
