/* Shared visual language for the landing page and authenticated workspace. */
:root { --ink: #193f30; --muted: #637367; --paper: #f8faf7; --panel: #fff; --line: #dde5d8; --accent: #224f3b; --accent-strong: #173e2c; --shadow: 0 8px 28px #193f3008; }
body { background: var(--paper); font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
button { border-radius: 10px; box-shadow: none; font-size: 14px; font-weight: 550; }
input, select, textarea { border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font-size: 14px; min-height: 44px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #6d9355; outline-offset: 3px; }
.card { border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow); }
.login-panel { min-height: 0; padding: 52px 0 64px; align-items: start; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: 64px; }
.login-panel .hero h1 { font-size: clamp(30px, 3.5vw, 46px); line-height: 1.12; letter-spacing: -.04em; margin-top: 0; }
.login-panel .hero p { font-size: 15px; line-height: 1.8; }
.connect-details { display: grid; gap: 12px; max-width: 420px; margin-top: 24px; }
.login-panel .hero .connect-attempt-note { margin: 0; padding: 14px; border-radius: 12px; background: #f0f5ea; color: #4c644d; font-size: 13px; line-height: 1.7; }
.accounts-panel { max-width: 1160px; padding-top: 40px; }
.accounts-heading h1 { font-size: clamp(28px, 3vw, 38px); font-weight: 600; letter-spacing: -.035em; }
.account-list-card { border-radius: 16px; box-shadow: none; }
.account-item-open { font-family: inherit; }
.license-access-bar, .license-reminders { background: #f8faf7; color: var(--ink); }
.license-reminder { border-color: #dce5d4; background: #edf3e7; }
.license-reminder h2, .license-reminder p { color: #435d43; }
.license-reminder-icon { color: var(--accent); background: #dfebd5; }
.license-reminder-action { background: var(--accent); border-color: var(--accent); }
.language-switcher { box-shadow: none; background: #fff; border-color: var(--line); }
.client { grid-template-columns: minmax(190px, 230px) minmax(290px, 350px) minmax(0, 1fr); }
.folders, .messages, .reader { background: #fff; backdrop-filter: none; }
.folders { background: #f4f7f0; }
.brand { gap: 12px; }
.brand > strong, #accountName { font-size: 15px; line-height: 1.5; }
.folder-button, .compose-button { border-radius: 10px; font-family: inherit; }
.message-item { border-radius: 0; box-shadow: none; background: #fff; color: var(--ink); }
.message-item:hover { background: #f5f8f0; }
.message-item.active { background: #eaf2e3; box-shadow: inset 3px 0 var(--accent); }
.message-subject { font-size: 14px; font-weight: 600; }
.toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 14px; }
.toolbar input { min-width: 0; grid-column: 1 / -1; }
.toolbar select, .toolbar button { width: auto; }
.reader-toolbar { padding-right: 18px; background: #f8faf7; }
.reader-header { padding: 24px; background: #fff; }
.reader-header h2 { font-size: clamp(21px, 2vw, 29px); line-height: 1.3; font-weight: 600; letter-spacing: -.03em; }
.reader-header dl { grid-template-columns: minmax(92px, auto) minmax(0, 1fr); column-gap: 20px; row-gap: 8px; font-size: 13px; line-height: 1.6; }
.attachments a { min-height: 44px; display: inline-flex; align-items: center; }
.compose-dialog { border: 1px solid var(--line); box-shadow: var(--shadow); }
@media (min-width: 981px) {
  body:has(.client:not(.hidden)) { display: flex; flex-direction: column; height: 100dvh; overflow: hidden; }
  body:has(.client:not(.hidden)) > .license-access-bar, body:has(.client:not(.hidden)) > .license-reminders { flex-shrink: 0; }
  body:has(.client:not(.hidden)) > .shell { flex: 1; min-height: 0; }
  body:has(.client:not(.hidden)) .client { height: 100% !important; }
  .client > .folders, .client > .messages, .client > .reader { height: 100%; }
}
@media (max-width: 980px) {
  .login-panel { grid-template-columns: 1fr; gap: 26px; max-width: 640px; padding: 28px 0 40px; }
  .login-panel .hero h1 { font-size: 32px; }
  .client { display: block; height: auto; overflow: visible; }
  .client > .reader { display: none; }
  .client.message-open > .folders, .client.message-open > .messages { display: none; }
  .client.message-open > .reader { display: grid; min-height: 65dvh; height: auto; overflow: visible; }
  .client.message-open #readerContent { height: auto; overflow: visible; display: block; }
  .client.message-open .reader-header { max-height: none; }
  .reader-toolbar { top: 0; gap: 10px; }
  .message-frame { display: block; min-height: 55dvh; }
  #backToListButton { display: inline-flex; }
  .folders { padding: 16px; }
  .brand { grid-template-columns: 1fr auto; align-items: center; }
  .brand-actions { justify-content: flex-end; }
  .messages { min-height: 45dvh; }
  .toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .toolbar input { grid-column: 1 / -1; }
  .toolbar select, .toolbar button { width: auto; }
  .reader-header { padding: 20px 16px; }
}
@media (max-width: 560px) {
  .license-access-bar { height: auto; padding: 50px 16px 12px; display: grid; grid-template-columns: 1fr auto; gap: 10px; }
  #licenseSummary { grid-column: 1 / -1; font-size: 12px; }
  .license-purchase-link { margin: 0; font-size: 13px; }
  .license-access-bar button { font-size: 12px; }
  .license-reminders { padding: 10px 16px; }
  .reader-header dl { grid-template-columns: 1fr; gap: 2px; }
  .reader-header dd { margin-bottom: 8px; }
  .reader-toolbar { font-size: 12px; }
  .reader-toolbar button { padding-inline: 12px; font-size: 12px; }
  .brand { grid-template-columns: 1fr; }
  .brand-actions { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition: none !important; } }

.connect-help, .workspace-help { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-size: 14px; text-underline-offset: 4px; }
.connect-help { margin-top: 6px; }
@media (max-width: 560px) { .license-access-bar .workspace-help { grid-column: 1; grid-row: 3; min-height: 32px; font-size: 13px; } .license-access-bar button { grid-column: 2; grid-row: 2 / 4; } }
