/* Shared Planori shell and portal components. Page-specific layouts stay in
   styles.css; the landing galleries keep their isolated landing-v3 styles. */
html.planori-site {
  --page: #f7f8f5;
  --paper: #fff;
  --ink: #172b45;
  --muted: #5d6a7b;
  --blue: #2259e8;
  --blue-hover: #1648c9;
  --line: #dce2e7;
  --sage: #dce9c8;
  --soft-blue: #edf2f9;
  --bg: var(--page);
  --surface: var(--paper);
  --surface-2: #f3f5f7;
  --primary: var(--blue);
  --primary-2: var(--blue-hover);
  --shadow: 0 12px 32px -22px #172b452b;
  --header-row-height: 82px;
  --anchor-gap: 16px;
  color: var(--ink);
  background: var(--page);
  scroll-padding-top: calc(var(--header-row-height) + 1px + var(--anchor-gap));
}
.planori-site *, .planori-site *::before, .planori-site *::after { box-sizing: border-box; }
.planori-site body { margin: 0; color: var(--ink); background: var(--page); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
.planori-site [hidden] { display: none !important; }
.planori-site :where(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid #7c9bfa; outline-offset: 4px; }
.planori-site ::selection { background: var(--sage); color: var(--ink); }
.portal-wrap { width: min(1240px, calc(100% - 80px)); margin-inline: auto; }
.planori-site .portal-skip-link { position: absolute; top: -100px; left: 20px; z-index: 100; padding: 12px 20px; color: white; background: var(--blue); border-radius: 6px; }
.portal-skip-link:focus { top: 15px; }
.portal-site-header { position: sticky; top: 0; z-index: 50; background: rgba(247, 248, 245, .97); border-bottom: 1px solid var(--line); }
.portal-header-inner { min-height: var(--header-row-height); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.planori-site .portal-brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; color: var(--ink); text-decoration: none; }
.portal-brand > span { font-weight: 750; letter-spacing: -1.3px; font-size: 28px; line-height: 1; }
.portal-brand img { display: block; flex-shrink: 0; border-radius: 10px; max-width: 100%; }
.portal-brand-dot { color: var(--blue); }
.portal-desktop-nav { display: flex; align-items: center; gap: 26px; }
.portal-desktop-nav a, .portal-login-link { font-size: 13px; font-weight: 550; white-space: nowrap; line-height: 1.6; text-decoration: none; }
.planori-site .portal-desktop-nav a { color: #4d5c6d; padding-block: 13px; }
.planori-site .portal-desktop-nav a:hover, .planori-site .portal-login-link:hover, .portal-footer-links a:hover { color: var(--blue); }
.planori-site .portal-desktop-nav a[aria-current="page"], .planori-site .portal-mobile-nav a[aria-current="page"] { color: var(--blue); font-weight: 650; }
.portal-header-actions { display: flex; align-items: center; gap: 25px; }
.planori-site .portal-login-link { display: inline-flex; gap: 8px; align-items: center; color: var(--ink); }
.portal-logout-form { display: inline-flex; margin: 0; }
.planori-site .portal-action { min-height: 42px; padding: 11px 16px; border: 1px solid transparent; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; background: var(--blue); color: white; font-family: inherit; font-size: 12px; font-weight: 600; line-height: 1.35; text-align: center; text-decoration: none; cursor: pointer; }
.planori-site .portal-action:hover { background: var(--blue-hover); }
.planori-site .portal-action-outline { color: var(--ink); background: transparent; border-color: #cbd3dd; }
.planori-site .portal-action-outline:hover { background: #edf0ed; border-color: #94a4b6; }
.portal-menu-toggle { display: none; width: 42px; height: 42px; padding: 10px; border: 0; background: transparent; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; }
.portal-menu-toggle span { width: 22px; height: 2px; background: var(--ink); transition: transform .15s ease; }
.portal-menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.portal-menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
.portal-mobile-nav { max-height: calc(100dvh - var(--header-row-height)); overflow-y: auto; border-top: 1px solid var(--line); padding: 10px 24px 20px; background: var(--page); }
.planori-site .portal-mobile-nav a { display: block; padding: 12px 0; font-size: 16px; line-height: 1.5; color: var(--ink); text-decoration: none; }
.portal-mobile-nav .portal-logout-form { margin-top: 12px; }
.portal-site-footer { padding-top: 60px; padding-bottom: 25px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.6; }
.portal-footer-top { display: grid; grid-template-columns: 1fr 1fr auto; gap: 60px; padding-bottom: 50px; }
.planori-site .portal-footer-top p { margin: 18px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.portal-footer-links { display: grid; gap: 10px; align-content: start; }
.planori-site .portal-footer-links a, .planori-site .portal-footer-email { color: var(--ink); text-decoration: none; }
.portal-footer-email { display: inline-flex; align-self: start; gap: 22px; font-weight: 600; }
.portal-footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 25px; padding-top: 23px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.portal-footer-bottom > div { display: flex; flex-wrap: wrap; gap: 28px; }
.planori-site .portal-footer-bottom a { color: inherit; text-decoration: none; }
.planori-site .portal-version-badge { position: static; width: min(1240px, calc(100% - 40px)); margin: 0 auto 14px; padding: 0; text-align: right; color: var(--muted); background: transparent; border: 0; box-shadow: none; backdrop-filter: none; }

/* Public pages, forms and data-heavy pages use the same quiet surfaces. */
.planori-portal body { font-size: 15px; line-height: 1.6; }
.planori-portal main { min-height: calc(100vh - 350px); }
.planori-portal h1, .planori-portal h2, .planori-portal h3 { color: var(--ink); font-weight: 650; }
.planori-portal h1 { line-height: 1.12; letter-spacing: -.04em; }
.planori-portal h2 { line-height: 1.25; letter-spacing: -.025em; }
.planori-portal h3 { line-height: 1.35; letter-spacing: -.015em; }
.planori-portal .eyebrow { color: var(--blue); font-size: 10px; line-height: 1.5; font-weight: 650; letter-spacing: 1.4px; }
.planori-portal .portal-shell { max-width: 1320px; padding: 48px 40px 80px; }
.planori-portal .portal-multipage > *, .planori-portal .two-column > * { min-width: 0; }
.planori-portal .portal-heading { gap: 20px; margin-bottom: 30px; align-items: flex-start; }
.planori-portal .portal-heading h1 { margin: 10px 0 12px; font-size: clamp(28px, 3vw, 40px); overflow-wrap: anywhere; }
.planori-portal .portal-heading p { color: var(--muted); max-width: 720px; line-height: 1.65; }
.planori-portal .heading-actions { flex-wrap: wrap; padding-top: 8px; gap: 8px; }
.planori-portal .button, .planori-portal .file-button { border-radius: 7px; min-height: 42px; padding: 10px 16px; background: transparent; border: 1px solid #cbd3dd; color: var(--ink); font-size: 13px; font-weight: 600; line-height: 1.4; box-shadow: none; white-space: normal; text-align: center; }
.planori-portal .button:hover, .planori-portal .file-button:hover { background: #edf0ed; border-color: #94a4b6; box-shadow: none; transform: none; }
.planori-portal .button.primary { background: var(--blue); border-color: var(--blue); color: white; }
.planori-portal .button.primary:hover { background: var(--blue-hover); border-color: var(--blue-hover); }
.planori-portal .button.danger { background: #fff4f2; color: #a52e2e; border-color: #efc7c1; }
.planori-portal .button.danger:hover { background: #ffe5df; }
.planori-portal .button.small { min-height: 34px; padding: 6px 11px; font-size: 12px; }
.planori-portal .button.large { min-height: 50px; padding: 14px 22px; }
.planori-portal .panel, .planori-portal .auth-card, .planori-portal .purchase-card { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: none; }
.planori-portal .panel { padding: 24px; }
.planori-portal .panel-head { gap: 16px; }
.planori-portal .panel-head h2 { font-size: 21px; font-weight: 650; }
.planori-portal .panel-head p { color: var(--muted); font-size: 13px; }
.planori-portal .panel > :first-child { margin-top: 0; }
.planori-portal .badge { border-radius: 5px; font-weight: 600; }
.planori-portal .badge.success, .planori-portal .badge.active, .planori-portal .badge.paid { background: #eaf1df; color: #456335; }
.planori-portal .badge.pending, .planori-portal .badge.awaiting_invoice { background: #f9efd9; color: #80561e; }
.planori-portal .table-wrap { max-width: 100%; border: 1px solid var(--line); border-radius: 9px; overflow-x: auto; }
.planori-portal table { font-size: 13px; }
.planori-portal th { background: #f3f5f3; color: var(--muted); font-weight: 600; }
.planori-portal td, .planori-portal th { border-color: var(--line); padding: 13px 14px; }
.planori-portal td a:not(.button) { color: var(--blue); }
.planori-portal td { overflow-wrap: anywhere; }
.planori-portal .empty-state { background: #f7f8f5; color: var(--muted); border-radius: 10px; padding: 30px 20px; line-height: 1.6; }
.planori-portal .empty-state b { color: var(--ink); font-weight: 600; }
.planori-portal .empty-state.small { padding: 22px 16px; }
.planori-portal :where(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea) { max-width: 100%; border: 1px solid #cbd3dd; border-radius: 7px; background: white; color: var(--ink); font-size: 14px; line-height: 1.5; padding: 10px 12px; }
.planori-portal :where(input, select, textarea):focus { border-color: var(--blue); }
.planori-portal input[type="checkbox"], .planori-portal input[type="radio"] { accent-color: var(--blue); }
.planori-portal :where(.stack-form, .settings-form, .inline-create-form, .release-form) label > span { font-size: 12px; color: var(--muted); font-weight: 600; }
.planori-portal .form-actions { flex-wrap: wrap; gap: 10px; }
.planori-portal .flash { width: min(1240px, calc(100% - 80px)); border-radius: 9px; font-weight: 500; }
.planori-portal .form-error { border-radius: 8px; }
.planori-portal .auth-shell, .planori-portal .purchase-shell { padding: 64px 20px 80px; }
.planori-portal .auth-card, .planori-portal .purchase-card { padding: 36px; min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.planori-portal .auth-card { width: min(100%, 500px); }
.planori-portal .auth-card h1, .planori-portal .purchase-card h1 { font-size: 34px; }
.planori-portal .auth-card .stack-form { margin-top: 28px; gap: 20px; }
.planori-portal .purchase-price { color: var(--ink); font-weight: 600; letter-spacing: -.04em; }

/* Cabinet: one navigation column and a flexible workspace. */
.planori-portal .account-shell { display: grid; grid-template-columns: 202px minmax(0, 1fr); gap: 36px; align-items: start; }
.account-content { min-width: 0; }
.account-content .table-wrap table { min-width: 640px; }
.account-nav { display: grid; gap: 4px; position: sticky; top: calc(var(--header-row-height) + 25px); padding: 16px 10px; border: 1px solid var(--line); border-radius: 12px; background: #f0f3ed; }
.account-nav-label { padding: 4px 12px 14px; color: #6a7866; font-size: 10px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; }
.account-nav a { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 7px; font-size: 13px; font-weight: 500; color: #536273; line-height: 1.4; }
.account-nav svg { flex-shrink: 0; }
.account-nav a:hover { color: var(--blue); background: #e8eee1; }
.account-nav a[aria-current="page"] { background: white; color: var(--blue); box-shadow: 0 2px 6px #172b4508; font-weight: 600; }
.planori-portal .account-content .metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.planori-portal .metric { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: white; gap: 8px; box-shadow: none; }
.planori-portal .metric b { color: var(--ink); font-size: clamp(25px, 2.6vw, 34px); line-height: 1.2; font-weight: 600; letter-spacing: -.04em; overflow-wrap: anywhere; }
.planori-portal .metric span, .planori-portal .metric small { color: var(--muted); font-weight: 500; }
.planori-portal .metric-link:hover { transform: none; box-shadow: none; border-color: #aab8c9; background: #fdfefb; }
.planori-portal .metric-link:first-child { background: #eaf0e1; border-color: #d4dfc8; }
.planori-portal .account-content .two-column { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.planori-portal .account-content .two-column > * { min-width: 0; }
.planori-portal .data-list > div, .planori-portal .organization-link-row { border-color: var(--line); }
.planori-portal .license-row { gap: 14px; }
.planori-portal .license-row > div { min-width: 0; }
.planori-portal .license-row .license-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.planori-portal .organization-card-link { box-shadow: none; }
.planori-portal .inline-create-form { grid-template-columns: minmax(0, 1fr) minmax(0, .65fr) auto; }
.planori-portal .organization-card-link:hover { box-shadow: none; border-color: #aab8c9; }
.planori-portal .organization-card-metrics > span, .planori-portal .organization-details-grid > div { background: #f4f6f1; border-color: #e2e7dc; border-radius: 8px; }
.planori-portal .organization-card-metrics b { font-weight: 600; }
.planori-portal .settings-layout { grid-template-columns: minmax(0, 1fr); }
.planori-portal .settings-summary { position: static; display: flex; flex-wrap: wrap; align-items: center; gap: 20px; padding: 22px; background: #edf2e7; }
.planori-portal .settings-summary > div { min-width: 0; }
.planori-portal .settings-summary p { overflow-wrap: anywhere; }
.planori-portal .account-avatar { width: 48px; height: 48px; border-radius: 10px; background: var(--sage); color: #456335; font-size: 22px; flex-shrink: 0; }
.planori-portal .settings-summary-list { margin: 0 0 0 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; border: 0; padding: 0; }
.planori-portal .settings-summary-list span { min-width: 0; display: grid; gap: 2px; border: 0; padding: 0; background: transparent; }
.planori-portal .settings-summary-list small { overflow-wrap: anywhere; font-size: 11px; font-weight: 500; }
.planori-portal .settings-summary-list b { font-size: 20px; font-weight: 600; }
.planori-portal .settings-summary h2 { margin: 0; font-size: 19px; }
.planori-portal .settings-cards { min-width: 0; }
.planori-portal .support-message { border-radius: 10px; }
.planori-portal .support-message.from-admin { background: var(--soft-blue); border-color: #d5dfed; }
.planori-portal .support-message-body { overflow-wrap: anywhere; }
.planori-portal .download-button { background: #f5f7f2; border: 1px solid #d7e1cb; border-radius: 10px; box-shadow: none; }
.planori-portal .download-button:hover { background: #eaf0e1; border-color: #aabd95; transform: none; }
.planori-portal .download-button strong { color: var(--blue); }
.planori-portal .release-notes { background: transparent; color: var(--muted); line-height: 1.7; }
.planori-portal .portal-subnav { position: static; background: #edf1e8; border: 1px solid var(--line); border-radius: 9px; margin-bottom: 24px; }
.planori-portal .portal-subnav a { font-weight: 500; border-radius: 6px; }
.planori-portal .portal-subnav a[aria-current="page"] { background: white; color: var(--blue); font-weight: 600; }

/* Guides, legal pages and the module catalogue. */
.planori-portal .guide-hero { max-width: 1240px; padding: 64px 40px 36px; }
.planori-portal .guide-hero h1, .planori-portal .page-hero h1 { font-size: clamp(34px, 4vw, 52px); font-weight: 650; max-width: 900px; }
.planori-portal .guide-hero p, .planori-portal .page-hero p { color: var(--muted); line-height: 1.75; }
.planori-portal .page-hero { background: var(--page); border-bottom: 1px solid var(--line); padding: 60px 0 48px; }
.planori-portal .guide-main, .planori-portal .guide-side { border-color: var(--line); border-radius: 12px; background: var(--paper); box-shadow: none; }
.planori-portal .guide-side { top: calc(var(--header-row-height) + 24px); }
.planori-portal .guide-side a { font-weight: 500; border-radius: 6px; }
.planori-portal .guide-side a[aria-current="page"] { color: var(--blue); background: var(--soft-blue); }
.planori-portal .guide-note { border: 1px solid #d5dfc9; border-radius: 9px; background: #edf2e7; color: #456335; }
.planori-portal .legal-document { font-family: inherit; overflow-wrap: anywhere; }
.planori-portal .legal-document p { text-align: left; }
.planori-portal .legal-document .notice { border-left: 3px solid #b9cda6; background: #edf2e7; border-radius: 8px; }
.planori-portal .legal-table { margin: 20px 0; }
.planori-portal .legal-table table { min-width: 620px; margin: 0; }
.planori-portal .guide-index-grid a, .planori-portal .module-card, .planori-portal .doc-card { border-radius: 10px; border-color: var(--line); background: white; box-shadow: none; }
.planori-portal .instruction-page { --archive-bg: var(--page); --archive-surface: white; --archive-strong: var(--ink); --archive-text: var(--ink); --archive-muted: var(--muted); --archive-brand: var(--blue); --archive-brand-strong: var(--blue-hover); --archive-brand-soft: var(--soft-blue); --archive-line: var(--line); --archive-shadow: none; --archive-shadow-sm: none; --archive-shadow-lg: none; background: var(--page); }
.planori-portal .instruction-page .archive-hero { background: var(--page); }
.planori-portal .instruction-page .archive-hero::before, .planori-portal .instruction-page .archive-hero::after { display: none; }
.planori-portal .instruction-page .archive-hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 56px; }
.planori-portal .instruction-page .archive-hero h1 { font-size: clamp(36px, 4.2vw, 58px); line-height: 1.08; font-weight: 650; letter-spacing: -.04em; }
.planori-portal .instruction-page .archive-eyebrow { color: var(--blue); background: transparent; border: 0; padding: 0; font-size: 10px; letter-spacing: 1.4px; font-weight: 650; }
.planori-portal .instruction-hero-panel a { background: white; border: 1px solid var(--line); border-radius: 12px; box-shadow: none; font-weight: 600; }
.planori-portal .instruction-hero-panel a:hover { border-color: #aab8c9; transform: none; box-shadow: none; }
.planori-portal .instruction-process-step, .planori-portal .instruction-preflight article, .planori-portal .instruction-faq details { border-radius: 12px; box-shadow: none; }
.planori-portal .instruction-process-num { background: var(--sage); color: #456335; font-weight: 600; border-radius: 8px; }
.planori-portal .instruction-step-links a { font-weight: 500; border-radius: 5px; }
.planori-portal .instruction-faq summary { font-weight: 600; }
.planori-portal .calendar-marketing { --bg: var(--page); --text: var(--ink); --blue: #2259e8; --muted: #5d6a7b; }
.planori-portal .calendar-marketing .wash { background: var(--page); }
.planori-portal .calendar-marketing h1, .planori-portal .calendar-marketing h2, .planori-portal .calendar-marketing h3 { font-weight: 650; }
.planori-portal .admin-table-tools { background: #f4f6f1; border-color: var(--line); border-radius: 9px; }
.planori-portal .admin-table-pager { color: var(--muted); }

@media (min-width: 1101px) {
  .portal-mobile-nav { display: none; }
}

@media (max-width: 1150px) {
  .portal-wrap { width: calc(100% - 56px); }
  .portal-desktop-nav { gap: 16px; }
  .portal-header-actions { gap: 16px; }
  .portal-header-inner { gap: 20px; }
  .portal-desktop-nav a, .portal-login-link { font-size: 12px; }
  .planori-portal .portal-shell { padding-inline: 28px; }
  .planori-portal .account-shell { grid-template-columns: 188px minmax(0, 1fr); gap: 24px; }
  .planori-portal .account-content .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .planori-portal .account-content .two-column { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1100px) {
  html.planori-site { --header-row-height: 76px; }
  .portal-wrap { width: calc(100% - 40px); }
  .portal-desktop-nav { display: none; }
  .portal-menu-toggle { display: flex; }
  .portal-header-actions { gap: 15px; }
  .portal-header-actions > .portal-login-link, .portal-header-actions > .portal-logout-form { display: none; }
  .portal-footer-top { grid-template-columns: 1fr 1fr; gap: 35px; }
  .portal-footer-email { grid-column: 1 / -1; }
  .planori-portal .portal-shell { padding: 30px 20px 64px; }
  .planori-portal .account-shell { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .account-nav { position: static; display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; }
  .account-nav-label { display: none; }
  .account-nav a { flex: 1 0 auto; justify-content: center; padding: 10px 12px; }
  .account-nav svg { width: 17px; height: 17px; }
  .planori-portal .account-content .metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .planori-portal .guide-hero { padding: 45px 24px 30px; }
  .planori-portal .guide-side { position: static; }
  .planori-portal .instruction-page .archive-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 620px) {
  html.planori-site { --header-row-height: 70px; }
  .portal-brand > span { font-size: 25px; }
  .portal-brand img { width: 34px; height: 34px; }
  .portal-brand { gap: 8px; }
  .portal-header-inner { gap: 10px; }
  .portal-header-actions { gap: 5px; }
  .portal-header-actions > .portal-action { padding: 10px 11px; font-size: 10px; min-height: 38px; gap: 8px; }
  .portal-header-actions > .portal-action span { display: none; }
  .portal-site-footer { padding-top: 38px; }
  .portal-footer-top { grid-template-columns: 1fr; gap: 28px; padding-bottom: 30px; }
  .portal-footer-links { grid-template-columns: 1fr 1fr; gap: 12px 20px; }
  .portal-footer-bottom { align-items: flex-start; flex-direction: column; gap: 16px; }
  .portal-footer-bottom > div { gap: 12px; flex-direction: column; }
  .planori-portal .portal-heading { flex-direction: column; gap: 14px; margin-bottom: 24px; }
  .planori-portal .portal-heading h1 { font-size: 30px; }
  .planori-portal .portal-heading p { font-size: 14px; overflow-wrap: anywhere; }
  .planori-portal .heading-actions { width: 100%; padding: 0; }
  .planori-portal .heading-actions .button { flex: 1; }
  .planori-portal .panel { padding: 18px; }
  .planori-portal .panel-head h2 { font-size: 20px; }
  .planori-portal .account-content .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .planori-portal .metric { padding: 16px; }
  .planori-portal .metric b { font-size: 27px; }
  .planori-portal .metric span { font-size: 12px; }
  .planori-portal .metric small { font-size: 10px; }
  .account-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-nav a { justify-content: flex-start; padding: 9px 8px; gap: 8px; font-size: 12px; }
  .planori-portal .settings-summary-list { width: 100%; margin: 0; gap: 12px; justify-content: space-between; }
  .planori-portal .settings-form { grid-template-columns: minmax(0, 1fr); }
  .planori-portal .inline-create-form { grid-template-columns: minmax(0, 1fr); }
  .planori-portal .auth-shell, .planori-portal .purchase-shell { padding: 32px 20px 56px; }
  .planori-portal .auth-card, .planori-portal .purchase-card { padding: 26px 22px; }
  .planori-portal .auth-card h1, .planori-portal .purchase-card h1 { font-size: 29px; }
  .planori-portal .flash { width: calc(100% - 40px); }
  .planori-portal .guide-hero { padding-inline: 20px; }
  .planori-portal .page-hero { padding: 40px 0 34px; }
  .planori-portal .guide-hero h1, .planori-portal .page-hero h1 { font-size: 34px; }
}
@media (max-width: 360px) {
  .portal-wrap { width: calc(100% - 28px); }
  .portal-header-actions > .portal-action { font-size: 9px; padding-inline: 8px; }
  .portal-brand > span { font-size: 23px; }
  .portal-brand img { width: 30px; height: 30px; }
  .planori-portal .portal-shell { padding-inline: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html.planori-site { scroll-behavior: auto; }
  .planori-site *, .planori-site *::before, .planori-site *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}


/* Account next steps: keep the shared shell and existing purchase controls. */
.planori-portal .cabinet { min-width: 0; }
.cabinet-steps { list-style: none; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; padding: 0; margin: 0 0 24px; }
.cabinet-steps li { display: flex; gap: 12px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; min-width: 0; }
.cabinet-steps li > span { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border-radius: 50%; background: #edf0eb; font-weight: 700; }
.cabinet-steps small { display: block; color: #626e66; font-size: 12px; line-height: 1.5; margin-top: 4px; }
.cabinet-steps b { font-size: 14px; }
.cabinet-steps .is-done > span { background: #e6efdd; color: #355321; }
.cabinet-steps .is-current { border-color: #718c6a; background: #f0f5eb; }
.planori-portal .cabinet .panel { margin-bottom: 22px; }
.planori-portal .cabinet .cabinet-next { background: #edf3e7; }
.cabinet h2, .cabinet h3, .cabinet p, .cabinet a, .cabinet strong { overflow-wrap: anywhere; }
.planori-portal .cabinet-next h2 { font-size: clamp(24px,3vw,32px); line-height: 1.2; margin: 8px 0 16px; }
.planori-portal .cabinet-next p { font-size: 17px; line-height: 1.6; max-width: 76ch; margin: 12px 0; }
.cabinet-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 18px; }
.planori-portal .cabinet .button { min-height: 48px; white-space: normal; text-align: center; }
.planori-portal .cabinet p.cabinet-note { font-size: 14px; line-height: 1.6; color: #52604e; }
.cabinet-offers { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.cabinet-offer { display: flex; flex-direction: column; align-items: flex-start; border: 1px solid #dce2d8; border-radius: 14px; padding: 24px; gap: 12px; min-width: 0; }
.cabinet-offer h3 { font-size: 23px; margin: 0; }
.planori-portal .cabinet-offer p { margin: 0; }
.cabinet-offer .check-list { margin: 0 0 8px; }
.cabinet-offer > .button { margin-top: auto; width: 100%; }
.cabinet-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.cabinet-price strong { font-size: 32px; line-height: 1.2; }
.cabinet-price del { color: #64705d; font-size: 16px; }
.cabinet-terms { font-weight: 600; }
.cabinet-list { display: grid; gap: 20px; margin-top: 18px; }
.cabinet-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid #e1e5dd; min-width: 0; }
.cabinet-item:last-child { border-bottom: 0; padding-bottom: 0; }
.cabinet-item > div { min-width: 0; }
.cabinet-item > .button { flex-shrink: 0; max-width: 46%; }
.cabinet-item h3 { margin: 8px 0; font-size: 19px; }
.planori-portal .cabinet-item p { margin: 8px 0; }
.cabinet-item .cabinet-actions { max-width: 42%; flex-shrink: 0; margin: 0; }
.cabinet-instructions { font-size: 17px; line-height: 1.6; }
.cabinet-instructions li { padding-block: 8px; }
.cabinet-downloads { margin-block: 18px; }
.cabinet-management summary { cursor: pointer; font-weight: 600; font-size: 18px; }
.cabinet-management[open] summary { margin-bottom: 22px; }
.cabinet-help { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.cabinet-help > .button { flex-shrink: 0; }
.cabinet [id] { scroll-margin-top: 120px; }
.cabinet a:focus-visible, .cabinet summary:focus-visible { outline: 3px solid #2455d6; outline-offset: 4px; }
@media (max-width: 1100px) {
  .cabinet-steps { gap: 8px; }
  .cabinet-steps li { align-items: flex-start; padding: 12px; gap: 8px; }
  .cabinet-item { flex-wrap: wrap; }
  .cabinet-item .cabinet-actions, .cabinet-item > .button { max-width: 100%; }
}
@media (max-width: 620px) {
  .cabinet-offers { grid-template-columns: minmax(0,1fr); }
  .cabinet-steps { gap: 6px; }
  .cabinet-steps li { flex-direction: column; align-items: flex-start; padding: 10px; }
  .cabinet-steps b { display: block; font-size: 12px; line-height: 1.35; }
  .cabinet-steps small { display: none; }
  .cabinet-offer { padding: 18px; }
  .cabinet-actions { align-items: stretch; }
  .cabinet-actions .button { width: 100%; }
  .cabinet-item, .cabinet-help { flex-direction: column; }
  .cabinet-help > .button { width: 100%; }
}

/* Public contacts: legal details and the software registration certificate. */
.planori-portal .contacts-layout { grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); align-items: start; }
.contacts-details { margin-bottom: 32px; }
.contacts-requisites { display: grid; gap: 16px; margin-block: 20px; }
.contacts-requisites div { min-width: 0; }
.contacts-requisites dt { color: #64748b; font-size: 14px; }
.contacts-requisites dd { margin: 4px 0 0; font-weight: 650; overflow-wrap: anywhere; }
.contacts-sidebar { display: grid; gap: 20px; min-width: 0; }
.contacts-sidebar .guide-side { position: static; }
.contacts-certificate { display: grid; gap: 14px; padding: 22px; }
.planori-portal .contacts-certificate h2 { margin: 0; font-size: 20px; line-height: 1.4; }
.planori-portal .contacts-certificate p { margin: 0; font-size: 14px; }
.contacts-certificate-preview { display: block; border: 1px solid #d8e2f1; border-radius: 8px; overflow: hidden; }
.contacts-certificate-preview img { display: block; width: 100%; height: auto; }
.contacts-certificate .button { white-space: normal; text-align: center; }
@media (max-width: 900px) {
  .planori-portal .contacts-layout { grid-template-columns: minmax(0, 1fr); }
  .contacts-certificate-preview { max-width: 360px; }
}
