/* mobile.css — focused mobile overrides on top of styles.css.
 * Loaded AFTER styles.css so plain selectors are enough to win.
 * Targets the desktop-only grids and stack-friendly behaviors. */

@media (max-width: 768px) {

  body.demo-workspace-body {
    overflow-x: hidden;
    overflow-y: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
  }

  /* Layout primitives */
  .wrap { padding: 0 24px; }
  .section { padding: 56px 0; }

  /* Nav — premium landing */
  .nav-premium { padding: 12px 20px; }
  .nav-premium .brand-tagline { display: none; }
  .nav-links-premium {
    gap: 14px;
    flex-wrap: nowrap;
  }
  .nav-text-link {
    font-size: 12px;
    padding: 4px 0;
  }
  .nav-premium .nav-cta {
    padding: 6px 12px;
    font-size: 12px;
  }

  /* Book a demo */
  .section-book-demo {
    padding-top: 48px;
    padding-bottom: 56px;
  }
  .book-demo-wrap {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .book-demo-copy h2 {
    max-width: none;
  }
  #book-demo .book-demo-form {
    padding: 20px;
  }

  /* Footer */
  .foot-premium {
    padding: 24px 0 28px;
  }
  .foot-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .foot-nav {
    justify-content: flex-start;
    gap: 12px 14px;
  }
  .foot-meta-row {
    padding-top: 12px;
  }

  .auth-modal {
    padding: 28px 24px 24px;
  }

  /* Hero — stack copy above showcase, tighten type */
  .hero { padding: 32px 0 24px; }
  .hero.wrap {
    padding-left: 26px;
    padding-right: 26px;
  }
  .hero-layout { grid-template-columns: 1fr; gap: 24px; }
  .hero-copy { padding: 0 2px; }
  .hero-showcase { margin: 0 2px; }
  .hero h1 { font-size: clamp(32px, 9vw, 44px); line-height: 1.08; }
  .hero-sub { font-size: 16px; }
  .hero-copy-premium h1 {
    font-size: clamp(36px, 9vw, 48px);
    max-width: none;
  }
  .hero-copy-premium .hero-sub {
    font-size: 16px;
    margin-bottom: 24px;
  }
  .hero-cta-row {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .hero-copy-premium .btn-hero-primary,
  .hero-copy-premium .btn-hero-secondary {
    width: 100%;
    min-height: 46px;
    padding: 0 16px;
    font-size: 14px;
  }
  .hero-note { font-size: 13px; }
  .flow-personas {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    padding-bottom: 2px;
  }
  .flow-persona { flex: 0 0 auto; }
  .wa-bubble.bot { margin-right: 0; }
  .wa-bubble.user { margin-left: 0; }

  /* Cinematic / showcase blocks: compact or hide if pure decoration */
  .hero-showcase { max-width: 100%; overflow: hidden; }
  .hero-cinematic .cinematic-panel { padding: 16px; }
  .hero-cinematic { transform: none !important; }

  /* All major multi-column grids → single column on mobile */
  .hero-layout,
  .flow-grid,
  .role-grid,
  .console-brief-grid,
  .manager-decision-grid,
  .evidence-grid,
  .problem-grid,
  .fragment-grid,
  .preview-training-grid,
  .audience-leader-grid,
  .pilot-layout,
  .priority-grid,
  .notifications-wrap,
  .demo-grid,
  .role-strip-wrap,
  .compare,
  .audience,
  .steps,
  .agent-section {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Section labels & headings */
  h1 { font-size: clamp(28px, 8vw, 40px); line-height: 1.1; }
  h2 { font-size: clamp(24px, 6vw, 32px); line-height: 1.15; }
  h3 { font-size: 18px; }
  .section-lead { font-size: 16px; }
  .section-label { font-size: 11px; }

  /* Demo workspace — stack panels, full-width chat */
  .demo-bar { padding: 12px 24px; }
  .demo-bar-inner { flex-wrap: wrap; gap: 12px; }
  .persona-switch {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    scrollbar-width: none;
  }
  .persona-switch::-webkit-scrollbar { display: none; }
  .persona-btn { flex-shrink: 0; }
  .persona-meta { width: 100%; }
  .demo-grid { padding: 16px; min-height: auto; }
  .chat { min-height: 60vh; }
  .workspace-shell {
    padding: 8px 6px;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .workspace-shell.sidebar-collapsed {
    height: calc(100dvh - var(--workspace-mobile-nav-top, 120px) - 12px) !important;
    max-height: calc(100dvh - var(--workspace-mobile-nav-top, 120px) - 12px) !important;
  }
  .workspace-shell.sidebar-collapsed .workspace-sidebar {
    flex: 0 0 48px !important;
    width: 48px !important;
    padding: 8px 4px;
    border-radius: 10px;
    min-width: 0;
  }
  .workspace-shell.sidebar-collapsed > .workspace-content {
    min-width: 0;
    max-width: 100%;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  .workspace-shell:not(.sidebar-collapsed) .workspace-content {
    overflow: visible;
  }
  .workspace-content .ops-card,
  .workspace-content .tab-panel,
  .workspace-content .panel-title-row,
  .workspace-content .settings-workspace-card {
    max-width: 100%;
    box-sizing: border-box;
  }
  .settings-workspace-section {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  .settings-workspace-footer {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  .settings-form-grid,
  .settings-form-grid-single {
    max-width: 100%;
  }
  .workspace-content input,
  .workspace-content select,
  .workspace-content textarea,
  .workspace-content .settings-select-trigger {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  input[type="number"] {
    min-width: 0;
  }
  .workspace-shell.sidebar-collapsed .nav-tab {
    margin-bottom: 6px;
    padding: 8px;
  }
  .workspace-shell.sidebar-collapsed .nav-tab-icon {
    width: 24px;
    height: 24px;
  }
  .workspace-sidebar {
    max-height: none;
    min-height: 0;
    top: auto;
  }
  .workspace-topbar {
    padding: 12px 18px;
    gap: 10px;
  }
  .workspace-controls {
    width: 100%;
    gap: 8px;
  }
  .workspace-company-static {
    width: 100%;
    flex-wrap: wrap;
    gap: 6px;
  }
  .workspace-company-pill,
  .persona-button {
    min-width: 0;
    width: 100%;
  }
  .nav-tab {
    padding: 8px 9px;
    font-size: 13px;
  }
  .nav-tab-icon {
    width: 24px;
    height: 24px;
  }
  .notifications-wrap {
    position: static;
    margin-left: auto;
  }
  .notifications-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(320px, calc(100vw - 24px));
    max-height: min(70vh, calc(100dvh - 86px));
    overflow-y: auto;
    z-index: 60;
  }
  .chat-head { padding: 14px 16px; gap: 8px; flex-wrap: wrap; }
  .chat-head h3 { font-size: 15px; }
  .chat-head p { font-size: 12px; line-height: 1.4; }
  .chat-input { padding: 12px; }
  .demo-workspace-body .workspace-chat {
    max-height: min(68dvh, calc(100dvh - var(--workspace-mobile-nav-top, 120px) - 32px));
  }
  .demo-workspace-body .chat-body {
    padding: 14px 12px;
  }
  .demo-workspace-body .chat-head-copy p {
    display: none;
  }
  .demo-workspace-body .suggested--compact {
    padding: 6px 6px !important;
    gap: 6px !important;
    min-height: 40px;
  }
  .demo-workspace-body .suggested--compact .suggested-chips .chip {
    font-size: 11px !important;
    padding: 5px 9px !important;
  }
  .demo-workspace-body .chat-input {
    padding: 8px 6px !important;
  }
  .demo-workspace-body .chat-input input {
    font-size: 12px;
    padding: 8px 10px;
  }
  .demo-workspace-body .chat-input button[type="submit"] {
    padding: 0 12px;
    font-size: 12px;
  }
  .demo-workspace-body .agent-followup-row .chip {
    flex: 0 0 auto;
    max-width: min(220px, 70vw);
    white-space: nowrap;
  }
  .feed-calendar-card {
    padding: 12px;
  }
  .feed-calendar-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .feed-calendar-controls {
    width: 100%;
    justify-content: space-between;
    gap: 6px;
  }
  .feed-calendar-controls .mini-action-btn {
    padding: 6px 8px;
    font-size: 10px;
  }
  .feed-month-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: 4px;
  }
  .feed-weekday-head {
    font-size: 9px;
    letter-spacing: 0.04em;
    padding: 0;
  }
  .feed-day-empty,
  .feed-day-cell {
    min-height: 54px;
  }
  .feed-day-cell {
    padding: 5px;
    gap: 3px;
  }
  .feed-day-cell strong {
    font-size: 14px;
  }
  .feed-day-cell p {
    font-size: 10px;
    line-height: 1.15;
  }
  .leave-requests-table > div:first-child {
    display: none;
  }
  .leave-requests-table > div:not(:first-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px 12px;
    padding: 14px 12px;
    border-radius: 12px;
    border: 1px solid #cad3e2;
    background: linear-gradient(180deg, #fffefb 0%, #f3f5f9 100%);
    box-shadow: 0 2px 10px rgba(23, 34, 52, 0.05);
  }
  .leave-requests-table > div:not(:first-child) > span {
    display: grid;
    gap: 3px;
    align-content: start;
    min-width: 0;
    font-size: 12px;
    line-height: 1.25;
    color: #232e42;
  }
  .leave-requests-table > div:not(:first-child) > span::before {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #2f65bc;
    opacity: 0.92;
  }
  .leave-requests-table > div:not(:first-child) > span:nth-child(1),
  .leave-requests-table > div:not(:first-child) > span:nth-child(7),
  .leave-requests-table > div:not(:first-child) > span:nth-child(8) {
    grid-column: 1 / -1;
  }
  .leave-requests-table > div:not(:first-child) > span:nth-child(1) {
    font-size: 13px;
    font-weight: 700;
    color: #1a222f;
    padding-bottom: 1px;
    border-bottom: 1px dashed #d2d9e6;
  }
  .leave-requests-table > div:not(:first-child) > span:nth-child(1)::before { content: "Employee"; }
  .leave-requests-table > div:not(:first-child) > span:nth-child(2)::before { content: "Role"; }
  .leave-requests-table > div:not(:first-child) > span:nth-child(3)::before { content: "Location"; }
  .leave-requests-table > div:not(:first-child) > span:nth-child(4)::before { content: "Leave type"; }
  .leave-requests-table > div:not(:first-child) > span:nth-child(5)::before { content: "Period"; }
  .leave-requests-table > div:not(:first-child) > span:nth-child(6)::before { content: "Status"; }
  .leave-requests-table > div:not(:first-child) > span:nth-child(7)::before { content: "Note"; }
  .leave-requests-table > div:not(:first-child) > span:nth-child(8)::before { content: ""; }
  .leave-requests-table .leave-admin-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "label label"
      "comment comment"
      "decline approve";
    gap: 6px;
  }
  .leave-requests-table .leave-admin-actions::before {
    content: "Actions";
    grid-area: label;
  }
  .leave-requests-table .leave-admin-actions .leave-action-btn[data-leave-action="decline"] {
    grid-area: decline;
  }
  .leave-requests-table .leave-admin-actions .leave-action-btn[data-leave-action="approve"] {
    grid-area: approve;
  }
  .leave-requests-table .leave-admin-actions .leave-action-btn[data-leave-action="comment"] {
    grid-area: comment;
  }
  .leave-requests-table .leave-action-btn {
    width: 100%;
    justify-content: center;
    min-height: 28px;
    font-size: 11px;
  }
  .leave-requests-table .status-pill {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    padding: 3px 7px;
    border-radius: 5px;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: capitalize;
    line-height: 1;
    box-shadow: none;
    border-width: 1px;
    border-style: solid;
  }
  .leave-requests-table .status-pill.status-pending {
    color: #8b6415;
    background: #e9edf5;
    border-color: #b3c2dd;
  }
  .leave-requests-table .status-pill.status-approved {
    color: #24653a;
    background: #eaf8ef;
    border-color: #c3e5ce;
  }
  .leave-requests-table .status-pill.status-declined {
    color: #8a2f35;
    background: #fdeff0;
    border-color: #efc3c8;
  }
  .joiners-simple-table > div:first-child {
    display: none;
  }
  .joiners-simple-table > div:not(:first-child) {
    grid-template-columns: 28px 1fr !important;
    gap: 8px 10px;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #cad2e1;
    background: linear-gradient(180deg, #fffefb 0%, #f3f5f9 100%);
  }
  .joiners-simple-table > div:not(:first-child) > span {
    min-width: 0;
    word-break: break-word;
  }
  .joiners-simple-table > div:not(:first-child) > span:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    padding-top: 1px;
  }
  .joiners-simple-table > div:not(:first-child) > span:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
    font-size: 13px;
    font-weight: 700;
    color: #1a222f;
    padding-bottom: 2px;
    border-bottom: 1px dashed #d2d9e6;
  }
  .joiners-simple-table > div:not(:first-child) > span:nth-child(n+3) {
    grid-column: 2;
    display: grid;
    gap: 2px;
    align-content: start;
    font-size: 12px;
    line-height: 1.25;
    color: #232e42;
  }
  .joiners-simple-table > div:not(:first-child) > span:nth-child(n+3)::before {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #2f65bc;
  }
  .joiners-simple-table > div:not(:first-child) > span:nth-child(3)::before { content: "Role"; }
  .joiners-simple-table > div:not(:first-child) > span:nth-child(4)::before { content: "Location"; }
  .joiners-simple-table > div:not(:first-child) > span:nth-child(5)::before { content: "Start date"; }
  .joiners-simple-table > div:not(:first-child) > span:nth-child(6)::before { content: "Stage"; }
  .joiners-simple-table > div:not(:first-child) > span:nth-child(7)::before { content: "Completion"; }
  .joiners-simple-table > div:not(:first-child) > span:nth-child(8)::before { content: "Note"; }
  .joiners-simple-table > div:not(:first-child) > span:nth-child(9)::before { content: "Training"; }
  .joiners-simple-table .joiners-completion-cell {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .joiners-simple-table .joiners-training-cell {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    align-items: start;
  }
  .joiners-simple-table .joiners-inline-send-btn {
    margin-left: 0;
    justify-self: start;
    width: auto;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 7px;
    font-size: 11px;
  }
  .feed-monthly-issues-table .feed-monthly-row {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px;
    align-items: center;
  }
  .feed-monthly-issues-table .feed-monthly-row > span:nth-child(1),
  .feed-monthly-issues-table .feed-monthly-row > span:nth-child(2) {
    grid-column: 1 / -1;
  }
  .feed-monthly-issues-table .feed-monthly-row > span:nth-child(4) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    padding: 3px 8px;
    border-radius: 5px;
    border: 1px solid #c2c9d6;
    background: #ebeff6;
    font-size: 11px;
    font-weight: 700;
    color: #354663;
    line-height: 1;
  }
  .feed-monthly-issues-table .ops-priority-tag,
  .feed-monthly-issues-table .ops-status-tag,
  .feed-monthly-training-table .ops-priority-tag,
  .feed-day-issues-table .ops-priority-tag,
  .feed-day-issues-table .ops-status-tag,
  .feed-day-training-table .ops-priority-tag,
  .feed-period-toggle button {
    border-radius: 5px;
  }
  .waitlist-next-step .waitlist-next-step-action {
    align-self: center;
    justify-content: center;
    border-radius: 8px;
    padding: 10px 14px;
    min-height: 34px;
    text-align: center;
  }
  #upgradeOverlay .modal-actions .btn-primary,
  #upgradeOverlay .modal-actions .btn-secondary {
    justify-content: center;
    text-align: center;
  }
  .reports-deck-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .reports-deck-head strong {
    width: 100%;
    word-break: break-word;
  }
  .reports-deck-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .reports-deck-actions .preview-lock-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
  .reports-deck-frame {
    display: none;
  }
  .reports-deck-preview::after {
    content: "Deck preview is simplified on mobile. Use Open presentation or Open in new tab for full view.";
    display: block;
    margin-top: 8px;
    font-size: 11px;
    line-height: 1.4;
    color: #255096;
    background: #e8ecf4;
    border: 1px solid #bec9db;
    border-radius: 8px;
    padding: 8px 9px;
  }
  .reports-history-table > div:first-child {
    display: none;
  }
  .reports-history-table > div:not(:first-child) {
    grid-template-columns: 1fr !important;
    gap: 5px;
    padding: 10px;
  }
  .reports-history-table > div:not(:first-child) > span {
    min-width: 0;
    word-break: break-word;
  }
  .reports-history-table > div:not(:first-child) > span:nth-child(1) {
    font-weight: 700;
    color: #1d2635;
  }
  .reports-history-table > div:not(:first-child) > span:last-child .reports-preview-btn {
    width: 100%;
    justify-content: center;
  }
  .reports-html-preview {
    overflow: hidden;
  }
  .reports-html-preview .ops-list li {
    word-break: break-word;
  }

  /* Cards / panels — tighter padding */
  .preview-sidebar,
  .preview-nav,
  .manager-panel,
  .notifications-panel,
  .side .card,
  .login-card,
  .company-setup-card {
    padding: 16px !important;
  }
  .login-overlay:not(.login-overlay-centered) {
    padding: 12px;
    align-items: flex-start;
  }
  .login-overlay-centered {
    align-items: center;
    justify-content: center;
    padding: max(14px, env(safe-area-inset-top, 0px)) 12px max(14px, env(safe-area-inset-bottom, 0px));
  }
  .login-overlay-centered .login-card {
    margin: auto;
    max-height: min(88dvh, calc(100dvh - 28px));
  }
  .login-card {
    width: 100%;
    max-height: calc(100vh - 24px);
  }
  .company-setup-card {
    width: 100%;
    max-height: calc(100vh - 24px);
  }
  .subscriber-auth-switch {
    min-width: 0;
    width: 100%;
  }
  .setup-row-head {
    flex-direction: column;
    align-items: stretch;
  }
  .setup-inline-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .setup-inline-actions .mini-action-btn,
  .company-setup-actions .btn-primary,
  .company-setup-actions .btn-secondary {
    width: 100%;
    justify-content: center;
  }
  .setup-item-row .remove-setup-row {
    justify-self: stretch;
  }
  .access-tier-banner {
    margin: 6px 8px 0;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.35;
    gap: 8px;
  }
  .access-tier-banner--setup {
    flex-direction: row;
    align-items: flex-start;
  }
  .access-tier-banner--setup .access-tier-banner-text {
    flex: 1 1 auto;
  }
  .access-tier-banner--setup .access-tier-actions {
    display: none;
  }
  .access-tier-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }
  .access-tier-actions .mini-action-btn {
    width: 100%;
    justify-content: center;
  }

  /* Tables / pricing / pilot blocks */
  .pricing-table, .table-wrap { overflow-x: auto; }
  .admin-topbar {
    padding: 12px 18px;
    flex-wrap: wrap;
    gap: 10px;
  }
  .admin-shell {
    width: calc(100% - 36px);
    padding: 18px 0 34px;
  }
  .admin-hero {
    padding: 16px;
    gap: 12px;
    flex-direction: column;
    align-items: stretch;
  }
  .admin-hero h1 {
    font-size: clamp(26px, 8vw, 34px);
    line-height: 1.08;
  }
  .admin-hero p {
    font-size: 14px;
    max-width: 100%;
  }
  .admin-metric-value { font-size: clamp(22px, 7vw, 30px); }
  .admin-table-head {
    padding: 12px 14px;
    flex-wrap: wrap;
    gap: 6px;
  }
  .admin-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .admin-table th,
  .admin-table td {
    padding: 10px 12px;
    font-size: 12px;
    white-space: normal;
    word-break: break-word;
  }

  /* Footer */
  .foot { padding: 32px 16px; font-size: 13px; }
  .foot-inner { gap: 8px; }
  .foot-links { display: flex; flex-wrap: wrap; gap: 10px; }

  /* Compare blocks (legacy) */
  .compare > div { padding: 16px; }
  .compare > div:last-child {
    padding-top: 44px;
  }
  .compare > div:last-child::after {
    top: 10px;
    right: 12px;
  }
  .clear-visual {
    margin: 6px 0 16px;
  }
}

/* Large phones */
@media (max-width: 430px) {
  /* One header row on a phone: sign in and sign up; "Book a demo" and the
     language picker are in the page and the footer. */
  .nav-links-premium .marketing-lang-select,
  .nav-links-premium a[href="#book-demo"],
  .nav-links-premium a.nav-text-link[href^="#"] {
    display: none;
  }
  /* Side by side the two CTAs broke onto two lines each. */
  .hero-cta-row {
    grid-template-columns: 1fr;
  }

  .workspace-shell {
    padding: 8px 6px;
    gap: 6px;
  }
  .workspace-shell.sidebar-collapsed {
    grid-template-columns: 44px minmax(0, 1fr) !important;
  }
  .wrap { padding: 0 20px; }
  .hero.wrap {
    padding-left: 22px;
    padding-right: 22px;
  }
  .section { padding: 38px 0; }
  h1 { font-size: clamp(26px, 9vw, 34px); }
  h2 { font-size: clamp(22px, 7vw, 28px); }
  .nav-actions > a { font-size: 13px; }
  .workspace-shell { padding: 16px; }
  .workspace-company-static {
    flex-direction: column;
    align-items: stretch;
  }
  .chat { min-height: 56vh; }
  .notifications-panel {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(300px, calc(100vw - 20px));
  }
  .feed-month-grid {
    gap: 3px;
  }
  .feed-day-empty,
  .feed-day-cell {
    min-height: 48px;
  }
  .feed-day-cell strong {
    font-size: 12px;
  }
  .feed-day-cell p {
    display: none;
  }
  .admin-metrics { grid-template-columns: 1fr; }
}

/* Small phones */
@media (max-width: 390px) {
  .auth-mode-switch,
  .subscriber-auth-switch {
    grid-template-columns: 1fr;
  }
  .insights-carousel .insight-item { padding: 16px; }
  .insights-carousel .insight-item p { font-size: 15px; }
  .admin-export-btn,
  .admin-clear-btn,
  .ghost-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Tighter tier for narrow phones */
@media (max-width: 480px) {
  .hero { padding: 24px 0; }
  .hero h1 { font-size: 30px; }
  .btn-primary, .btn-secondary { padding: 12px 16px; font-size: 14px; }
}

/* Extra-small phones */
@media (max-width: 320px) {
  .wrap { padding: 0 10px; }
  .nav { padding: 10px; }
  .nav-actions { gap: 6px; padding: 3px; }
  .nav-actions > a { padding: 10px 8px; font-size: 12px; }
  .btn-primary, .btn-secondary { font-size: 13px; }
  .demo-grid,
  .workspace-shell,
  .login-card,
  .company-setup-card { padding: 10px !important; }
  .admin-shell { width: calc(100% - 16px); }
  .admin-topbar { padding: 10px; }
  .admin-table th,
  .admin-table td { padding: 8px 10px; font-size: 11.5px; }
}

