/* Account and recovery surfaces use the same neutral tokens as the tools. */
.account-toggle { min-height: 36px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--surface); cursor: pointer; font-size: 11px; font-weight: 700; white-space: nowrap; }
.account-toggle:hover { border-color: var(--brand); background: var(--hover); }
.account-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 7px 14px; padding: 12px 20px 0; }
.account-toolbar button { min-width: 0; max-width: 100%; min-height: 28px; padding: 3px 0; border: 0; color: var(--muted); background: transparent; cursor: pointer; font-size: 11px; font-weight: 500; text-align: left; }
.account-toolbar button:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.guest-welcome { margin: 14px 18px 0; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.guest-welcome h2 { margin: 0 0 5px; font-size: 15px; font-weight: 600; line-height: 1.35; }
.guest-welcome p { margin: 0 0 11px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.guest-action { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--brand); background: var(--surface); cursor: pointer; font-size: 12px; font-weight: 650; line-height: 1.4; }
.guest-action:hover { border-color: var(--brand); background: var(--hover); }
.guest-action span { flex: 0 0 auto; font-size: 17px; line-height: 1; }
.account-panel { margin: 16px 18px 0; padding: 20px; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); background: var(--surface); }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.panel-heading > div { min-width: 0; }
.panel-heading h2 { margin: 4px 0 0; font-size: 21px; font-weight: 600; line-height: 1.3; letter-spacing: -.025em; }
.account-panel h3 { margin: 20px 0 10px; font-size: 13px; font-weight: 600; }
.account-help { margin: 10px 0; color: var(--muted); font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.account-help a { color: var(--brand); }
.account-notice { margin: 12px 20px 0; padding: 11px 13px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); background: var(--surface); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.account-notice.error { border-color: var(--danger); color: var(--danger); background: var(--danger-bg); }
.account-notice > p { margin: 0; }
.account-label { display: block; margin: 12px 0 6px; font-size: 12px; font-weight: 500; }
.account-panel input, .draft-controls input, .signature-save-row input, #savedSignatureSelect { width: 100%; min-width: 0; min-height: 40px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 5px; background: var(--canvas); color: var(--ink); font-size: 13px; }
.account-panel input::placeholder, .draft-controls input::placeholder, .signature-save-row input::placeholder { color: var(--muted); }
.account-panel .secondary-action { margin-top: 10px; }
.account-divider { display: flex; align-items: center; gap: 12px; margin: 17px 0 10px; color: var(--muted); font-size: 11px; }
.account-divider::before, .account-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
/* Official Google light button retains its own brand colours in both themes. */
@font-face { font-family: "Google Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/google-sans-medium.ttf") format("truetype"); }
.google-login { width: 100%; height: 40px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 12px; border: 1px solid #747775; border-radius: 4px; background: #fff; color: #1f1f1f; font-family: "Google Sans", Arial, sans-serif; font-weight: 500; font-size: 14px; line-height: 20px; letter-spacing: 0; cursor: pointer; }
.google-login-icon { display: block; flex: 0 0 20px; width: 20px; height: 20px; object-fit: contain; background: #fff; }
.google-login-label { color: inherit; font: inherit; white-space: nowrap; }
.google-login:hover:not(:disabled) { border-color: #1f1f1f; }
.google-login:focus-visible { outline: 2px solid #0b57d0; outline-offset: 2px; }
button:disabled { cursor: default; opacity: .6; }
#loginCode { letter-spacing: .25em; font-size: 22px; text-align: center; }
#accountEmail { font-weight: 500; font-size: 13px; overflow-wrap: anywhere; }
.draft-controls { margin: 14px 0; padding: 12px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }
.draft-controls .secondary-action { margin-top: 8px; }
.draft-controls .account-help { margin-bottom: 0; font-size: 11px; }
.signature-save-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.signature-save-row input { flex: 1 1 140px; }
.signature-save-row .subtle-button { flex: 0 0 auto; font-size: 12px; }
.library-list { display: grid; gap: 8px; }
.library-row { display: flex; align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }
.library-open { min-width: 0; flex: 1; padding: 0; border: 0; text-align: left; color: var(--ink); background: transparent; cursor: pointer; }
.library-open strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 500; }
.library-open small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.library-signature { width: 74px; height: 36px; flex: 0 0 auto; object-fit: contain; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.tab-mode { width: 100%; min-height: 100vh; max-height: none; }
.tab-mode .shell { max-width: 1120px; margin: auto; min-height: 100vh; }
.tab-mode .hero h1, .tab-mode .hero > p { max-width: 650px; }
.tab-mode .pdf-preview { max-height: 72vh; }
.tab-mode #openEditorTab { display: none; }
.tab-mode .account-panel { max-width: 640px; width: calc(100% - 40px); align-self: center; }
.tab-mode .guest-welcome { max-width: 640px; width: calc(100% - 40px); align-self: center; }
.tab-mode .workspace { padding: 20px; }
@media (min-width: 720px) {
  .tab-mode .topbar { flex-wrap: nowrap; }
  .tab-mode .header-actions { flex: 0 0 auto; width: auto; }
  .tab-mode .language-select { width: 150px; }
  .tab-mode .tools { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 359px) { .account-toolbar { padding-right: 16px; padding-left: 16px; } .guest-welcome, .account-panel, .account-notice { margin-right: 16px; margin-left: 16px; } .account-panel { padding: 14px; } .tab-mode .account-panel, .tab-mode .guest-welcome { width: calc(100% - 32px); } }
