/* Shared Herlein visual language. Layout and PDF dimensions stay in workspace.css. */
:root {
  --blue-hover: #103ECB;
  --herlein-gradient: radial-gradient(ellipse at 100% 0%, #258FFF 0%, transparent 65%), linear-gradient(120deg, #1035BA, #0D4EFF);
  --herlein-shadow: 0 8px 28px rgba(20, 57, 118, .07);
}
body { background: #F2F6FD; }
.emoji-icon {
  display: inline-block;
  flex-shrink: 0;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
  font-size: 1.15em;
  font-style: normal;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
  vertical-align: middle;
}
button:focus-visible, input:focus-visible {
  outline: 3px solid #25C7FF;
  outline-offset: 3px;
}
button { touch-action: manipulation; }
.topbar {
  width: min(1020px, calc(100% - 40px));
  min-height: 84px;
  gap: 16px;
}
.brand { min-height: 44px; }
.brand-text { font-size: 23px; }
.brand-text strong { color: #1035BA; }
.language-switch { box-shadow: none; border-color: #DBE6F8; border-radius: 13px; }
.language-switch button { min-width: 38px; min-height: 36px; }
.language-switch button.active { background: #0D4EFF; box-shadow: 0 3px 9px #0D4EFF26; }
.auth-signin, .auth-signup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  font-size: 12px;
  border-radius: 12px;
}
.auth-signup { background: #0D4EFF; box-shadow: 0 4px 12px #0D4EFF20; }
.auth-signin { border-color: #D5E2F8; color: #244978; }
.landing { padding-top: 10px; }
.hero {
  max-width: none;
  padding: 40px 190px 44px 36px;
  border: 1px solid #497CFF;
  border-radius: 28px;
  background: var(--herlein-gradient);
  box-shadow: 0 14px 35px rgba(13, 78, 255, .16);
  overflow: hidden;
}
.hero::before { display: none; }
.hero .privacy-pill {
  max-width: 100%;
  margin-top: 0;
  padding: 8px 11px;
  border-color: rgba(255,255,255,.22);
  background: rgba(8,37,129,.18);
  color: #E4F0FF;
  font-size: 11px;
  line-height: 1.5;
  box-shadow: none;
}
.hero h1 {
  margin: 22px 0 16px;
  color: white;
  font-size: clamp(34px, 4.7vw, 50px);
  line-height: 1.08;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.hero p { color: #E0ECFF; font-size: 16px; line-height: 1.65; }
.hero-document-art {
  top: 50%;
  right: 66px;
  width: 72px;
  height: 96px;
  transform: translateY(-30%) rotate(8deg) scale(1.2);
}
.hero-document-art i:last-child::before { width: 43px; left: 14px; top: 23px; }
.hero-document-art span { width: 36px; height: 36px; font-size: 20px; }
.chooser { margin-top: 30px; }
.chooser-heading { margin-bottom: 14px; align-items: center; gap: 12px; }
.chooser h2 { color: #213D66; font-size: 17px; letter-spacing: -.02em; margin: 0; }
.mode-grid { gap: 16px; }
.mode-card {
  min-height: 134px;
  padding: 24px 20px;
  border: 1px solid #DEE8F8;
  border-radius: 21px;
  background: white;
  box-shadow: var(--herlein-shadow);
  gap: 16px;
}
.mode-card::after { display: none; }
.mode-card:hover { border-color: #91B4FF; box-shadow: 0 12px 32px #17479D17; }
.mode-card.pro-locked { border-color: #B8CDFC; background: linear-gradient(120deg, white, #F0F5FF); }
.mode-icon, .workspace-icon {
  width: 62px;
  height: 62px;
  border-radius: 19px;
  border: 1px solid #DAE7FF;
  background: linear-gradient(145deg, #FFFFFF, #E2ECFF);
  color: #0D4EFF;
  box-shadow: inset 0 2px 0 white, 0 4px 0 #CDDCF5, 0 8px 14px #0D4EFF12;
  transform: rotate(-4deg);
  font-size: 31px;
}
.mode-icon::before, .workspace-icon::before { display: none; }
.mode-icon .emoji-icon, .workspace-icon .emoji-icon { filter: drop-shadow(0 3px 2px #153B8129); }
.mode-copy { min-width: 0; gap: 7px; }
.mode-copy strong { font-size: 17px; line-height: 1.25; }
.mode-copy small { font-size: 13px; line-height: 1.55; color: #5C7090; }
.mode-title-row { flex-wrap: wrap; }
.chevron { color: #0D4EFF; font-size: 23px; }
.plan-chip { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; border-radius: 11px; }
.plan-chip.pro, .pro-badge, .inline-pro-badge { background: #0D4EFF; color: white; border-color: #0D4EFF; box-shadow: none; }
.privacy-block { border-color: #DFE8F8; border-radius: 18px; background: #FFFFFFB3; box-shadow: none; }
.privacy-icon { width: 40px; height: 40px; font-size: 20px; background: #EAF1FF; box-shadow: none; }
.privacy-block strong { font-size: 13px; }
.privacy-block small { color: #667C9B; }
.workspace { padding-top: 8px; }
.back-link { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; color: #315A94; }
.workspace-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  padding: 24px;
  margin: 10px 0 20px;
  border-radius: 23px;
  background: var(--herlein-gradient);
  box-shadow: 0 10px 26px #0D4EFF20;
}
.workspace-heading h1 { color: white; font-size: clamp(25px, 4vw, 34px); }
.workspace-heading .eyebrow { color: #C6DDFF; font-size: 10px; letter-spacing: .14em; }
.workspace-heading .workspace-icon { border-color: #FFFFFF80; box-shadow: 0 4px 0 #002EBA, 0 7px 14px #07298333; }
.workspace-heading .plan-chip { background: #FFFFFF20; color: white; border-color: #FFFFFF50; box-shadow: none; }
.capture-panel, .settings-panel, .page-card, .ready-card {
  border: 1px solid #DDE7F7;
  border-radius: 20px;
  background: white;
  box-shadow: var(--herlein-shadow);
}
.capture-panel, .settings-panel { padding: 22px; }
.smart-scan-row strong { color: #234367; font-size: 14px; }
.smart-scan-row small { font-size: 12px; line-height: 1.55; }
.smart-scan-dot { background: #0D4EFF; box-shadow: none; }
.primary-action, .secondary-action, .create-pdf, .share-button, .save-button, .preview-document {
  min-height: 52px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  padding: 12px 16px;
  white-space: normal;
  gap: 9px;
}
.action-icon { font-size: 22px; flex-shrink: 0; }
.primary-action, .create-pdf, .share-button {
  background: linear-gradient(115deg, #0D4EFF, #216AFF);
  border-color: #0D4EFF;
  color: white;
  box-shadow: 0 5px 15px #0D4EFF21;
}
.primary-action:hover, .create-pdf:not(:disabled):hover, .share-button:hover { background: #103ECB; border-color: #103ECB; }
.secondary-action, .preview-document, .save-button { background: #F2F6FF; border: 1px solid #CADAFA; color: #17479D; box-shadow: none; }
.secondary-action:hover, .preview-document:not(:disabled):hover, .save-button:hover { background: #E7EFFF; }
.document-progress > span { border-radius: 11px; background: #F5F8FD; font-size: 12px; }
.document-progress > span.complete { color: #144ECB; background: #EDF3FF; border-color: #B5CDFD; }
.empty-state { min-height: 166px; padding: 22px; border: 1px dashed #B6CEF4; border-radius: 20px; background: #EDF3FD; text-align: center; }
.empty-icon { width: 52px; height: 52px; font-size: 34px; }
.empty-state p { color: #526F96; font-size: 13px; }
.page-controls { gap: 7px; }
.page-controls button { min-height: 40px; border-radius: 10px; padding: 8px 10px; background: #F4F7FE; border-color: #DFE8F8; color: #284F88; }
.page-controls button.danger { color: #B42318; background: #FFF7F6; border-color: #F5DFDB; }
.page-controls button .emoji-icon { margin-right: 3px; }
.section-label { color: #294C7A; font-size: 13px; }
.segmented { padding: 4px; gap: 4px; border: 1px solid #DDE7F8; border-radius: 13px; background: #F0F4FC; }
.segmented button { min-height: 42px; border: 0; border-radius: 9px; color: #536E94; font-size: 12px; padding: 8px; }
.segmented button.active { background: white; color: #0D4EFF; box-shadow: 0 2px 6px #1D44821A; }
.document-size-options button { border-radius: 13px; min-height: 76px; background: #F8FAFF; box-shadow: none; }
.document-size-options button.active { border-color: #0D4EFF; background: #EDF3FF; box-shadow: inset 0 0 0 1px #0D4EFF; }
.document-size-options button strong { line-height: 1.5; }
.document-size-options button .emoji-icon { font-size: 17px; color: inherit; }
.filename-field input { min-height: 46px; font-size: 14px; }
.ready-check { background: #EDF5FF; border-radius: 15px; box-shadow: none; font-size: 28px; }
.text-button { min-height: 44px; color: #0D4EFF; }
.notice-box { border-radius: 13px; background: #EEF4FF; border-color: #CFDEFA; color: #2D5389; }
.error-box { border-radius: 13px; }
.scanner-modal, .crop-modal, .preview-modal { background: rgba(5,22,57,.72); }
.scanner-shell, .crop-shell { background: #071B3A; }
.scanner-topbar, .crop-topbar, .preview-topbar { background: var(--herlein-gradient); border-bottom: 1px solid #FFFFFF24; min-height: 68px; }
.scanner-topbar strong, .crop-topbar strong, .preview-topbar strong { font-size: 14px; color: white; }
.crop-topbar small, .preview-topbar small { color: #D4E6FF; }
.scanner-close, .crop-close, .preview-close { width: 40px; height: 40px; background: #FFFFFF16; border-color: #FFFFFF50; }
.scanner-bottom, .crop-actions { background: #0A2552; }
.scanner-native { display: inline-flex; align-items: center; gap: 5px; color: #E8F2FF; min-height: 44px; line-height: 1.45; }
.scanner-tip { color: #B9CFF1; }
.scanner-shutter { border-color: #72D9FF; box-shadow: 0 0 0 5px #0D4EFF35; }
.scanner-shutter span { background: linear-gradient(145deg, #FFFFFF, #B3DDFF); }
.scanner-guides i { border-color: #71DCFF; }
.crop-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 13px; min-height: 48px; padding: 8px; }
.crop-apply { background: #0D4EFF; border-color: #4C8FFF; color: white; }
.crop-cancel { background: #FFFFFF0B; border-color: #FFFFFF3D; }
.preview-body { background: #E8EFFA; }
.preview-shell { background: #F2F6FD; }
footer { color: #6A7F9C; }
@media (max-width: 680px) {
  .topbar { width: calc(100% - 28px); min-height: 102px; padding: 12px 0; gap: 8px; }
  .brand-text { font-size: 20px; }
  .topbar-actions { gap: 8px; }
  .auth-signin, .auth-signup { min-height: 36px; padding: 6px 8px; font-size: 10px; gap: 4px; }
  .language-switch button { min-height: 32px; min-width: 34px; }
  .landing { padding-top: 4px; }
  .hero { border-radius: 23px; padding: 24px 22px 28px; }
  .hero h1 { margin: 22px 0 14px; max-width: 480px; font-size: clamp(32px, 8.7vw, 43px); }
  .hero p { font-size: 14px; max-width: 480px; }
  .hero .privacy-pill { font-size: 10px; padding: 6px 8px; }
  .hero-document-art { display: none; }
  .chooser { margin-top: 24px; }
  .chooser h2 { font-size: 16px; }
  .mode-grid { gap: 12px; }
  .mode-card { min-height: 114px; padding: 18px 16px; border-radius: 19px; gap: 13px; }
  .mode-icon, .workspace-icon { width: 54px; height: 54px; border-radius: 16px; font-size: 28px; }
  .mode-copy strong { font-size: 16px; }
  .mode-copy small { font-size: 12px; }
  .privacy-block { margin: 22px 0 30px; padding: 16px; }
  .workspace-heading { padding: 20px 16px; gap: 12px; grid-template-columns: auto minmax(0, 1fr); }
  .workspace-heading .plan-chip { margin: 0 0 0 66px; grid-column: 1 / -1; justify-self: start; }
  .capture-panel, .settings-panel { padding: 17px; border-radius: 18px; }
  .capture-actions { gap: 10px; }
  .document-size-options { gap: 6px; }
  .document-size-options button { padding: 9px 7px; }
  .document-size-options button strong { font-size: 11px; }
  .document-size-options button > span { font-size: 9px; }
}
@media (max-width: 380px) {
  .topbar { flex-wrap: wrap; }
  .topbar-actions { width: 100%; display: flex; flex-wrap: wrap; justify-content: space-between; }
  .mode-card { gap: 10px; padding: 16px 12px; }
  .mode-icon { width: 46px; height: 46px; font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
  .mode-card:hover { transform: none; }
}
