/* Layout only. Colours and fonts come from theme.css variables. */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--color-bg); color: var(--color-fg); font-family: var(--font-sans); font-size: 16px; line-height: 1.45; }
a { color: var(--color-accent); }
.preview-banner { background: var(--color-banner); color: var(--color-muted); font-size: 13px; padding: 6px 16px; text-align: center; border-bottom: 1px solid var(--color-border); }
.site-header { background: var(--color-surface); border-bottom: 1px solid var(--color-border); }
.site-header .in, .site-footer .in, .wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--space); }
.site-header .in { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 12px; flex-wrap: nowrap; }
.logo { display: flex; align-items: center; line-height: 0; }
.logo img, .footer-logo { height: var(--logo-h); width: auto; display: block; }
.nav { display: flex; gap: 16px; align-items: center; flex-wrap: nowrap; }
.nav a { color: var(--color-fg); text-decoration: none; }
.nav-inline { display: none; gap: 16px; align-items: center; }
.nav-menu { position: relative; flex: none; }
.nav-menu-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 0 12px; background: var(--color-surface); color: var(--color-fg); border: 1px solid var(--color-border); border-radius: var(--radius); font: inherit; font-weight: 600; cursor: pointer; }
.nav-menu-icon { display: block; }
.nav-icon-close { display: none; }
.nav-menu.is-open .nav-icon-open { display: none; }
.nav-menu.is-open .nav-icon-close { display: block; }
.nav-menu-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 220px; max-width: calc(100vw - 24px); background: #fff; border: 1px solid var(--color-border); box-shadow: 0 8px 24px color-mix(in srgb, var(--color-ink) 12%, transparent); padding: 6px; }
.nav-menu-panel[hidden] { display: none; }
.nav-menu-panel a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--color-fg); text-decoration: none; }
.nav-menu-panel a:hover, .nav-menu-panel a:focus-visible { background: var(--color-mist); }
.nav-mobile-only { display: flex; }
@media (min-width: 801px) {
  .nav-inline { display: flex; }
  .nav-mobile-only { display: none; }
  .nav-menu-text { display: none; }
}
.send-email-form .actions { margin: 12px 0 8px; }
.send-email-form .actions .btn { white-space: nowrap; flex: 0 0 auto; }
main { padding: 24px 0 48px; min-height: 60vh; }
.wrap { padding: 0 var(--space); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; }
h1 { font-size: 1.6rem; margin: 0 0 8px; }
h3 { font-size: 1.05rem; margin: 0 0 6px; }
h2 { font-size: 1.2rem; margin: 28px 0 10px; }
.sub { color: var(--color-muted); margin: 0 0 20px; }
.site-footer { background: var(--color-navy); color: var(--color-mist); padding: 24px 0; font-size: 14px; }
.site-footer .brand { font-weight: 800; font-family: var(--font-display); color: #fff; }
.site-footer .legal { color: var(--color-mist); margin-top: 8px; }
.site-footer nav { margin-top: 12px; display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer nav a { color: var(--color-mist); text-decoration: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0; background: var(--color-primary); color: var(--color-primary-text); border: 0; padding: 10px 16px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; border-radius: var(--radius); -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: transform .12s ease, background-color .12s ease, box-shadow .12s ease, filter .12s ease; }
.btn.ghost { background: var(--color-surface); color: var(--color-fg); border: 1px solid var(--color-border); }
.btn:active:not(:disabled):not(.is-busy), .btn.is-pressed:not(:disabled):not(.is-busy) { transform: scale(0.97) translateY(1px); }
.btn:not(.ghost):active:not(:disabled):not(.is-busy), .btn:not(.ghost).is-pressed:not(:disabled):not(.is-busy) { background: var(--color-primary-pressed); }
.btn.ghost:active:not(:disabled):not(.is-busy), .btn.ghost.is-pressed:not(:disabled):not(.is-busy) { background: var(--color-banner); }
.btn.is-busy, .btn[disabled] { cursor: not-allowed; opacity: .9; }
.btn-spinner { width: 18px; height: 18px; margin-right: 8px; border: 2px solid color-mix(in srgb, var(--color-primary-text) 30%, transparent); border-top-color: var(--color-primary-text); border-radius: 50%; animation: btn-spin .6s linear infinite; flex: none; }
.btn.ghost .btn-spinner { border-color: color-mix(in srgb, var(--color-fg) 25%, transparent); border-top-color: var(--color-fg); }
@keyframes btn-spin { to { transform: rotate(360deg); } }

.stack { display: flex; flex-direction: column; gap: 10px; max-width: 480px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
input, textarea, select { font: inherit; padding: 8px 10px; border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-fg); border-radius: var(--radius); width: 100%; }
textarea { min-height: 80px; }
.err { color: var(--color-danger); font-size: 14px; }
.note { background: var(--color-surface); border: 1px solid var(--color-border); padding: 12px 14px; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.plan { background: var(--color-surface); border: 1px solid var(--color-border); padding: 16px; }
.plan h3 { margin: 0 0 6px; }
.plan .price { font-size: 1.4rem; font-weight: 700; margin: 8px 0; }
.plan ul { margin: 0; padding-left: 18px; }
.dev-link { margin-top: 16px; padding: 12px 14px; background: var(--color-surface); border: 1px dashed var(--color-border); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.editor { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.editor .form-col, .editor .preview-col { background: var(--color-surface); border: 1px solid var(--color-border); padding: 14px; }
.fieldset { border: 1px solid var(--color-border); padding: 10px; margin: 0 0 12px; }
.fieldset legend { font-weight: 600; padding: 0 4px; }
.score-hero { font-size: 3rem; font-weight: 700; margin: 8px 0 16px; }
.fixes { padding-left: 20px; }
.cv-preview { font-family: var(--font-cv); color: var(--color-ink); background: #fff; padding: 28px 24px; min-height: 400px; border: 1px solid var(--color-mist); }
.cv-preview h1 { font-family: var(--font-display); font-weight: 800; font-size: 22px; margin: 0 0 4px; color: var(--color-navy); }
.cv-preview .contact { font-size: 12px; color: #444; margin-bottom: 12px; }
.cv-preview h2 { font-family: var(--font-display); font-weight: 800; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-navy); border-bottom: 1px solid var(--color-teal); margin: 14px 0 6px; padding-bottom: 2px; }
.cv-preview p, .cv-preview li { font-size: 12px; margin: 0 0 4px; }
.cv-preview .job { margin-bottom: 8px; }
.cv-preview .job .t { font-weight: 700; display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.modal-back { position: fixed; inset: 0; background: color-mix(in srgb, var(--color-fg) 30%, transparent); display: none; align-items: center; justify-content: center; padding: 16px; z-index: 20; }
.modal-back.on { display: flex; }
.modal { background: var(--color-surface); border: 1px solid var(--color-border); max-width: 420px; width: 100%; padding: 20px; }
@media (max-width: 800px) {
  .plans, .editor { grid-template-columns: 1fr; }
}

table { border-collapse: collapse; width: 100%; margin: 8px 0 20px; }
td { border-bottom: 1px solid var(--color-border); padding: 6px 8px; text-align: left; }


.nav { font-size: 14px; }
.tmpl-pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.tmpl-pick button { position: relative; }
.tmpl-pick button.on { background: var(--color-primary); color: var(--color-primary-text); }
.tmpl-pick .lock-hint { font-size: 12px; font-weight: 400; margin-left: 6px; color: var(--color-muted); }
.tmpl-eyebrow { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-teal); font-weight: 700; margin: 0 0 4px; font-family: var(--font-display); }
.cv-preview.tmpl-ats h1, .cv-preview.tmpl-ats h2 { color: var(--color-ink); }
.cv-preview.tmpl-ats h2 { border-bottom-color: #333; text-transform: none; letter-spacing: 0; font-weight: 700; }
.ai-badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; background: var(--color-mist); color: var(--color-navy); padding: 3px 8px; vertical-align: middle; }
.checklist { list-style: none; padding: 0; margin: 0 0 20px; }
.checklist li { display: grid; grid-template-columns: 1.5em 1fr; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--color-border); }
.checklist input { width: 1.1em; height: 1.1em; margin-top: 3px; }
.share-qr { width: 200px; height: 200px; background: #fff; padding: 8px; border: 1px solid var(--color-border); }
.share-qr svg { width: 100%; height: 100%; display: block; }
.letter-edit { min-height: 280px; font-family: var(--font-sans); }

.share-box { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; margin: 16px 0 24px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Footer layout copied from Tendaq (logo | links | legal lines), with PenCV navy theme. */
.footer-row { display: flex; flex-direction: column; gap: 20px; }
.footer-legal { max-width: 20rem; }
.footer-legal p { margin: 0 0 6px; }
.site-footer nav { margin-top: 0; }
.sso-row { display: flex; flex-direction: column; gap: 10px; max-width: 420px; margin: 16px 0 8px; }
.sso-row .btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin: 0; min-height: 48px; text-align: center; font-weight: 600; }
.sso-logo { display: block; flex: 0 0 auto; }
.sso-google { background: #fff !important; color: #1f1f1f !important; border: 1px solid #747775 !important; }
.sso-facebook { background: #1877F2 !important; color: #fff !important; border-color: #1877F2 !important; }
.sso-or { display: flex; align-items: center; gap: 10px; color: var(--color-muted); font-size: 13px; margin: 18px 0 12px; }
.sso-or:before, .sso-or:after { content: ""; flex: 1; height: 1px; background: var(--color-line, #d7e0e8); }
@media (min-width: 800px) {
  .footer-row { flex-direction: row; flex-wrap: wrap; gap: 24px 32px; justify-content: space-between; align-items: flex-start; }
  .footer-legal { text-align: right; }
}

/* Legal tabs — ShowMyGarden format, PenCV navy/teal */
.legal-tabs { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 8px; }
.legal-tabs a { color: var(--color-ink); text-decoration: none; border-bottom: 2px solid transparent; padding: 2px 0; }
.legal-tabs a.on, .legal-tabs a[aria-current="page"] { color: var(--color-navy, #0B3C5D); border-bottom-color: var(--color-teal, #1FB5A8); font-weight: 600; }
.upd { color: var(--color-muted); font-size: 13px; margin: 0 0 20px; }
ol.steps { padding-left: 1.3rem; }
ol.steps li { margin: 0 0 8px; }
.hint { color: var(--color-muted); font-size: 13px; margin-top: 16px; }

/* Home sign-in bottom sheet — ShowMyGarden #modal.sheet pattern, PenCV brand.
   Shown only on the home page, after a few seconds, once per session. */
.auth-sheet-backdrop {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(11, 60, 93, 0.45);
  opacity: 0; pointer-events: none;
  transition: opacity 280ms ease;
}
.auth-sheet-backdrop[hidden] { display: none; }
.auth-sheet-backdrop.is-open { opacity: 1; pointer-events: auto; }
.auth-sheet {
  width: 100%; max-width: 440px;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -8px 32px rgba(11, 60, 93, 0.18);
  transform: translateY(110%);
  transition: transform 320ms cubic-bezier(.2, .8, .2, 1);
  max-height: 90vh; overflow: auto;
}
.auth-sheet-backdrop.is-open .auth-sheet { transform: translateY(0); }
.auth-sheet-hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.auth-sheet-hd h2 { margin: 0 0 4px; font-size: 1.25rem; color: var(--color-navy, #0B3C5D); }
.auth-sheet-hd .sub { margin: 0; }
.auth-sheet-close {
  flex: 0 0 auto; width: 40px; height: 40px; border: 0; border-radius: 999px;
  background: #eef3f6; color: var(--color-navy, #0B3C5D);
  font-size: 26px; line-height: 1; cursor: pointer;
}
.auth-sheet-close:hover, .auth-sheet-close:focus-visible { background: #dce6ec; }
.auth-sheet .sso-row, .auth-sheet form.stack { max-width: none; }
@media (min-width: 640px) {
  .auth-sheet-backdrop { align-items: center; }
  .auth-sheet { border-radius: 16px; max-width: 420px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-sheet-backdrop, .auth-sheet { transition: none; }
}

.repeat-item { margin: 0 0 14px; padding: 0 0 12px; border-bottom: 1px solid var(--color-border); }
.repeat-item:last-of-type { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.ai-bullets-row { margin: 8px 0 0; }
.ai-bullets-suggest { margin-top: 10px; padding: 12px 14px; border: 1px solid var(--color-border); background: var(--color-mist); border-radius: var(--radius); }
.ai-bullets-suggest ul { margin: 8px 0 10px; padding-left: 1.2rem; }
.ai-bullets-suggest li { margin: 0 0 6px; }
mark.ph { background: color-mix(in srgb, var(--color-sand) 55%, #fff); color: var(--color-ink); padding: 0 3px; border-radius: 2px; font-style: normal; font-weight: 600; }
#placeholder-warning { margin: 0 0 12px; }
#placeholder-warning[hidden] { display: none; }

.check-row { display: flex; flex-direction: row; align-items: flex-start; gap: 8px; font-size: 14px; }
.check-row input { width: auto; margin-top: 3px; }
.app-list { list-style: none; padding: 0; margin: 0 0 24px; }
.app-item { display: flex; flex-wrap: wrap; gap: 12px 16px; justify-content: space-between; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--color-border); }
.app-title { margin: 0 0 4px; }
.app-item .sub { margin: 0; }
.app-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.app-actions label { min-width: 140px; }
.app-actions select { width: auto; min-width: 140px; }
#send-reminder[hidden], #share-pdf[hidden], #applications-empty[hidden] { display: none; }
