/* Warm Coastal Studio theme for ConvertIt.pro. Screen-only styling preserves all print/PDF outputs. */
@media screen {
  :root,
  body:has(.fw-header),
  body[data-tool],
  body.ci-home {
    --ui-canvas: #faf6f0;
    --ui-canvas-warm: #f4ece1;
    --ui-surface: #ffffff;
    --ui-surface-warm: #fffdf9;
    --ui-surface-tint: #fbf5ee;
    --ui-surface-subtle: #f7f1e8;
    --ui-ocean: #15445c;
    --ui-ocean-deep: #103347;
    --ui-ocean-hover: #0e3245;
    --ui-ocean-soft: #e6f2f6;
    --ui-coral: #e26245;
    --ui-coral-hover: #cc4e31;
    --ui-coral-soft: #fff0ea;
    --ui-coral-ink: #a63a21;
    --ui-amber-soft: #fef4e3;
    --ui-amber-ink: #a65912;
    --ui-ink: #142c3d;
    --ui-muted: #586875;
    --ui-line: #e6ddd2;
    --ui-line-strong: #d3c6b7;
    --ui-radius-xl: 20px;
    --ui-radius-lg: 16px;
    --ui-radius-md: 11px;
    --ui-radius-sm: 8px;
    --ui-shadow-sm: 0 2px 6px rgba(20, 44, 61, 0.04), 0 10px 24px -14px rgba(20, 44, 61, 0.10);
    --ui-shadow-md: 0 6px 16px rgba(20, 44, 61, 0.06), 0 20px 40px -18px rgba(20, 44, 61, 0.16);
    --ui-shadow-coral: 0 6px 18px -6px rgba(226, 98, 69, 0.55);
    --ui-font: Workbench, "Segoe UI", system-ui, -apple-system, sans-serif;

    /* Align legacy CSS variables across every tool stylesheet */
    --brand: var(--ui-ocean);
    --accent: var(--ui-coral);
    --accent-2: var(--ui-ocean);
    --accent-3: var(--ui-ocean);
    --forest: var(--ui-ocean);
    --green: var(--ui-ocean);
    --terra: var(--ui-coral);
    --ink: var(--ui-ink);
    --text: var(--ui-ink);
    --muted: var(--ui-muted);
    --text-muted: var(--ui-muted);
    --line: var(--ui-line);
    --border: var(--ui-line);
    --border-accent: var(--ui-ocean);
    --mint: var(--ui-surface-tint);
    --paper: var(--ui-canvas);
    --bg: var(--ui-canvas);
    --bone: var(--ui-canvas);
    --surface: var(--ui-surface);
    --surface-hover: var(--ui-surface-subtle);
  }

  body[data-tool]:has(.fw-header),
  body[data-tool]:has(.ci-header.fw-header),
  body[data-tool]:has(.site-header.fw-header),
  body[data-tool]:has(.top-header.fw-header) {
    background-color: var(--ui-canvas);
    background-image:
      radial-gradient(ellipse 72% 360px at 14% -60px, rgba(226, 98, 69, 0.10), transparent 65%),
      radial-gradient(ellipse 68% 360px at 88% -40px, rgba(21, 68, 92, 0.08), transparent 65%);
    background-repeat: no-repeat;
    color: var(--ui-ink);
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
  }

  body.ci-home {
    background: var(--ui-canvas);
    color: var(--ui-ink);
    font-family: var(--ui-font);
    -webkit-font-smoothing: antialiased;
  }

  /* =====================================================================
     1. WARM FROSTED STICKY HEADER & QUICK SEARCH TRIGGER
     ===================================================================== */
  header.fw-header,
  .ci-home header.fw-header {
    position: sticky;
    top: 0;
    z-index: 40;
    min-height: 68px;
    padding: 8px max(24px, calc((100% - 1220px) / 2));
    background: rgba(255, 253, 249, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--ui-line);
    box-shadow: 0 2px 14px -8px rgba(20, 44, 61, 0.10);
    gap: 18px;
  }

  .ci-home .fw-header .ocean-logo,
  .fw-header .ocean-logo {
    width: 214px;
    height: 46px;
  }

  .ci-home .fw-header .ocean-logo img,
  .fw-brand .ocean-logo img {
    width: 248px;
    height: auto;
    left: -18px;
    top: -58px;
  }

  .ci-home .fw-header .fw-links,
  .fw-header .fw-links {
    gap: 6px;
    margin-left: auto;
  }

  .ci-home .fw-header .fw-links a,
  .fw-header .fw-links a {
    font-family: var(--ui-font);
    font-size: 14px;
    font-weight: 600;
    color: var(--ui-ink);
    padding: 8px 14px;
    min-height: 40px;
    border-radius: 999px;
    text-decoration: none;
    transition: background-color 0.16s ease, color 0.16s ease;
  }

  .ci-home .fw-header .fw-links a:hover,
  .fw-header .fw-links a:hover {
    background: var(--ui-coral-soft);
    color: var(--ui-coral-ink);
    text-decoration: none;
  }

  .fw-header .fw-links a[aria-current="page"] {
    background: var(--ui-ocean);
    color: #ffffff;
    font-weight: 700;
  }

  .ui-quick-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 6px 14px;
    margin: 0;
    width: auto;
    flex: none;
    border: 1px solid var(--ui-line-strong);
    border-radius: 999px;
    background: var(--ui-surface);
    color: var(--ui-muted);
    font-family: var(--ui-font);
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(20, 44, 61, 0.04);
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  }

  .ui-quick-trigger:hover {
    background: var(--ui-coral-soft);
    border-color: var(--ui-coral);
    color: var(--ui-ink);
    box-shadow: 0 4px 12px -4px rgba(226, 98, 69, 0.28);
  }

  .ui-quick-trigger svg {
    width: 16px;
    height: 16px;
    color: var(--ui-coral);
    flex: none;
  }

  .ui-quick-trigger kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    border: 1px solid var(--ui-line);
    border-radius: 6px;
    background: var(--ui-canvas);
    color: var(--ui-muted);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
  }

  .fw-menu summary {
    border-radius: 999px;
    border-color: var(--ui-line-strong);
    background: var(--ui-surface);
    color: var(--ui-ink);
    min-height: 40px;
    padding: 0 14px;
    font-size: 13px;
  }

  .fw-menu nav {
    border-radius: 14px;
    border: 1px solid var(--ui-line);
    box-shadow: var(--ui-shadow-md);
    padding: 6px;
    width: 204px;
    background: var(--ui-surface-warm);
  }

  .fw-menu nav a {
    border-radius: 10px;
    min-height: 42px;
  }

  .fw-menu nav a:hover {
    background: var(--ui-coral-soft);
    color: var(--ui-coral-ink);
    text-decoration: none;
  }

  /* =====================================================================
     2. COMMAND PALETTE (INSTANT 70-TOOL SWITCHER)
     ===================================================================== */
  dialog.ui-palette {
    width: min(640px, calc(100vw - 24px));
    max-height: min(76vh, 620px);
    margin: min(10vh, 72px) auto auto;
    padding: 0;
    border: 1px solid var(--ui-line-strong);
    border-radius: 20px;
    background: var(--ui-surface-warm);
    color: var(--ui-ink);
    box-shadow: 0 28px 70px -14px rgba(16, 42, 60, 0.36);
    overflow: hidden;
  }

  dialog.ui-palette::backdrop {
    background: rgba(16, 42, 60, 0.48);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
  }

  .ui-palette-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--ui-line);
    background: var(--ui-surface);
  }

  .ui-palette-head:focus-within {
    border-bottom-color: var(--ui-coral);
    box-shadow: inset 0 -2px 0 var(--ui-coral);
  }

  .ui-palette-head svg {
    width: 20px;
    height: 20px;
    color: var(--ui-coral);
    flex: none;
  }

  .ui-palette-head input {
    flex: 1;
    min-width: 0;
    min-height: 36px;
    padding: 4px 0;
    margin: 0;
    border: 0;
    background: transparent;
    color: var(--ui-ink);
    font-family: var(--ui-font);
    font-size: 16px;
    box-shadow: none;
  }

  .ui-palette-head input:focus,
  .ui-palette-head input:focus-visible {
    outline: none;
    box-shadow: none;
  }

  .ui-palette-close {
    flex: none;
    width: auto;
    min-height: 34px;
    padding: 4px 10px;
    margin: 0;
    border: 1px solid var(--ui-line);
    border-radius: 8px;
    background: var(--ui-canvas);
    color: var(--ui-muted);
    font-size: 12px;
    font-weight: 600;
  }

  .ui-palette-close:hover {
    background: var(--ui-coral-soft);
    color: var(--ui-coral-ink);
    border-color: var(--ui-coral);
  }

  .ui-palette-list {
    list-style: none;
    margin: 0;
    padding: 10px;
    max-height: min(56vh, 440px);
    overflow-y: auto;
  }

  .ui-palette-item a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--ui-ink);
    text-decoration: none;
    transition: background-color 0.12s ease;
  }

  .ui-palette-item a:hover,
  .ui-palette-item a[data-active="true"] {
    background: var(--ui-coral-soft);
    color: var(--ui-ink);
    text-decoration: none;
  }

  .ui-palette-item strong {
    display: block;
    font-family: var(--ui-font);
    font-size: 15px;
    font-weight: 700;
  }

  .ui-palette-item small {
    display: block;
    font-size: 12.5px;
    color: var(--ui-muted);
    margin-top: 2px;
  }

  .ui-palette-badge {
    flex: none;
    font-size: 11px;
    font-weight: 700;
    color: var(--ui-ocean);
    background: var(--ui-ocean-soft);
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
  }

  .ui-palette-empty {
    padding: 28px 16px;
    text-align: center;
    color: var(--ui-muted);
    font-size: 14px;
  }

  .ui-palette-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 18px;
    border-top: 1px solid var(--ui-line);
    background: var(--ui-canvas);
    color: var(--ui-muted);
    font-size: 12px;
    font-weight: 500;
  }

  /* =====================================================================
     3. HOMEPAGE: SUNLIT WARM HERO, PORTAL LANES & COLOR-CODED DIRECTORY
     ===================================================================== */
  .wb-hero {
    min-height: clamp(470px, 41vw, 575px);
    padding: 36px max(24px, calc((100% - 1220px) / 2)) 44px;
    background:
      radial-gradient(circle at 10% 18%, rgba(226, 98, 69, 0.14), transparent 44%),
      radial-gradient(circle at 86% 26%, rgba(21, 68, 92, 0.11), transparent 48%),
      linear-gradient(180deg, #fffdf9 0%, #faf3e9 100%);
  }

  .wb-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    margin: 0 0 18px;
    border-radius: 999px;
    background: var(--ui-coral-soft);
    border: 1px solid rgba(226, 98, 69, 0.24);
    color: var(--ui-coral-ink);
    font-family: var(--ui-font);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.01em;
  }

  .wb-intro h1 {
    font-size: clamp(38px, 4.7vw, 66px);
    color: var(--ui-ocean-deep);
    margin-bottom: 16px;
  }

  .wb-intro h1 span {
    color: var(--ui-coral);
  }

  .wb-intro p {
    font-size: clamp(16px, 1.4vw, 20px);
    color: var(--ui-muted);
    margin-bottom: 24px;
  }

  .wb-button {
    background: var(--ui-coral);
    color: #ffffff;
    box-shadow: var(--ui-shadow-coral);
    transition: background-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
  }

  .wb-button:hover {
    background: var(--ui-coral-hover);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px -6px rgba(226, 98, 69, 0.55);
  }

  .wb-explore {
    padding: 13px 26px;
    font-size: 17px;
    margin-bottom: 18px;
    border-radius: 13px;
  }

  .wb-explore svg {
    width: 20px;
    height: 20px;
  }

  .wb-search {
    min-height: 58px;
    border-radius: 15px;
    border: 1.5px solid var(--ui-line-strong);
    background: var(--ui-surface);
    box-shadow: 0 6px 20px -8px rgba(20, 44, 61, 0.12);
  }

  .wb-search:focus-within {
    border-color: var(--ui-coral);
    outline: 3px solid rgba(226, 98, 69, 0.22);
    outline-offset: 2px;
  }

  .wb-search svg {
    color: var(--ui-coral);
  }

  .wb-quick-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    max-width: 550px;
  }

  .wb-quick-label {
    font-size: 11.5px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ui-muted);
    margin-right: 2px;
  }

  .wb-quick-chips a {
    display: inline-flex;
    align-items: center;
    min-height: 33px;
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid var(--ui-line);
    background: rgba(255, 255, 255, 0.92);
    color: var(--ui-ocean);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(20, 44, 61, 0.04);
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
  }

  .wb-quick-chips a:hover {
    background: var(--ui-coral-soft);
    border-color: var(--ui-coral);
    color: var(--ui-coral-ink);
    transform: translateY(-1px);
    text-decoration: none;
  }

  .wb-panel {
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 24px 54px -18px rgba(16, 42, 60, 0.28);
  }

  .wb-tabs button[aria-selected="true"] {
    background: var(--ui-coral-soft);
    color: var(--ui-coral-ink);
  }

  /* 3 Inviting Portal Cards */
  .wb-lanes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    max-width: 1268px;
    margin: 0 auto;
    padding: 28px 24px 12px;
    border-top: 0;
  }

  .wb-lanes a,
  .wb-lanes a + a {
    border: 1px solid var(--ui-line);
    border-radius: 18px;
    background: var(--ui-surface);
    padding: 20px 22px;
    box-shadow: var(--ui-shadow-sm);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  }

  .wb-lanes a:hover {
    transform: translateY(-3px);
    box-shadow: var(--ui-shadow-md);
    border-color: var(--ui-coral);
  }

  .wb-lane-icon {
    width: 56px;
    height: 56px;
    border-radius: 15px;
    background: var(--ui-coral-soft);
    color: var(--ui-coral-ink);
  }

  .wb-lanes a:nth-child(2) .wb-lane-icon {
    background: var(--ui-ocean-soft);
    color: var(--ui-ocean);
  }

  .wb-lanes a:nth-child(3) .wb-lane-icon {
    background: var(--ui-amber-soft);
    color: var(--ui-amber-ink);
  }

  .wb-lane-icon svg {
    width: 28px;
    height: 28px;
  }

  .wb-lanes strong {
    font-size: 20px;
    color: var(--ui-ink);
  }

  .wb-lanes a:hover strong {
    color: var(--ui-coral-ink);
  }

  .wb-lanes small {
    font-size: 13.5px;
    color: var(--ui-muted);
  }

  .wb-lanes a > svg {
    color: var(--ui-line-strong);
    transition: transform 0.16s ease, color 0.16s ease;
  }

  .wb-lanes a:hover > svg {
    color: var(--ui-coral);
    transform: translateX(3px);
  }

  /* Directory band: warm canvas, shelf bundles, vibrant color-coded 3-column cards */
  .ci-home .ci-browse-layout {
    display: block;
    max-width: none;
    padding: 24px max(24px, calc((100% - 1220px) / 2)) 56px;
    background: var(--ui-canvas);
    border-top: 0;
  }

  .ci-home .ci-bundles {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    max-width: 1220px;
    margin: 0 auto 24px;
    padding: 14px 18px;
    background: var(--ui-surface);
    border: 1px solid var(--ui-line);
    border-radius: var(--ui-radius-lg);
    box-shadow: var(--ui-shadow-sm);
    position: static;
  }

  .ci-home .ci-bundles h2 {
    font-size: 12px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--ui-muted);
    margin: 0 8px 0 0;
  }

  .ci-home .ci-bundles > p {
    display: none;
  }

  .ci-home .ci-bundles button {
    display: inline-flex;
    align-items: center;
    width: auto;
    min-height: 38px;
    padding: 6px 14px;
    margin: 0;
    border: 1px solid var(--ui-line);
    border-radius: 999px;
    background: var(--ui-canvas);
    color: var(--ui-ink);
    font-family: var(--ui-font);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  }

  .ci-home .ci-bundles button:hover {
    border-color: var(--ui-coral);
    background: var(--ui-coral-soft);
    color: var(--ui-coral-ink);
  }

  .ci-home .ci-bundles button[aria-pressed="true"] {
    background: var(--ui-ocean);
    border-color: var(--ui-ocean);
    color: #ffffff;
  }

  .ci-home .ci-directory {
    max-width: 1220px;
    padding: 0;
    margin: 0 auto;
    background: transparent;
  }

  .ci-home .ci-directory-title {
    margin: 0 0 14px;
    align-items: baseline;
    gap: 12px;
  }

  .ci-home .ci-directory-title h2 {
    font-size: 28px;
    font-weight: 800;
    color: var(--ui-ink);
    letter-spacing: -0.03em;
  }

  .ci-home .ci-directory-title span {
    font-size: 13px;
    font-weight: 700;
    padding: 4px 11px;
    border-radius: 999px;
    background: var(--ui-coral-soft);
    color: var(--ui-coral-ink);
  }

  .ci-home .ci-filters {
    gap: 8px;
    margin: 0 0 22px;
  }

  .ci-home .ci-filters button {
    border-radius: 11px;
    border: 1px solid var(--ui-line);
    background: var(--ui-surface);
    color: var(--ui-ink);
    font-family: var(--ui-font);
    font-size: 13px;
    font-weight: 650;
    min-height: 41px;
    padding: 7px 14px;
    box-shadow: 0 1px 2px rgba(20, 44, 61, 0.03);
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  }

  .ci-home .ci-filters button:hover {
    border-color: var(--ui-coral);
    background: var(--ui-coral-soft);
    color: var(--ui-coral-ink);
  }

  .ci-home .ci-filters button[aria-pressed="true"] {
    background: var(--ui-coral);
    border-color: var(--ui-coral);
    color: #ffffff;
    box-shadow: var(--ui-shadow-coral);
  }

  .ci-home #bundleContext {
    background: var(--ui-surface);
    border: 1px solid var(--ui-line);
    border-radius: 16px;
    padding: 18px 22px;
    margin: 0 0 22px;
    box-shadow: var(--ui-shadow-sm);
  }

  .ci-home #bundleSections {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 8px;
  }

  .ci-home #bundleSections button {
    width: auto;
    min-height: 36px;
    padding: 6px 13px;
    border-radius: 999px;
    border: 1px solid var(--ui-line);
    background: var(--ui-canvas);
    color: var(--ui-ink);
    font-size: 13px;
    font-weight: 600;
  }

  .ci-home #bundleSections button[aria-pressed="true"] {
    background: var(--ui-coral);
    border-color: var(--ui-coral);
    color: #ffffff;
  }

  .ci-home .ci-browse-layout .ci-tool-grid,
  .ci-home .ci-tool-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }

  .ci-home .ci-tool-grid .ci-tool {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    min-height: 110px;
    padding: 20px;
    border: 1px solid var(--ui-line);
    border-radius: 16px;
    background: var(--ui-surface);
    box-shadow: 0 2px 5px rgba(20, 44, 61, 0.03);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
  }

  .ci-home .ci-tool-grid .ci-tool:hover {
    border-color: var(--ui-coral);
    background: var(--ui-surface);
    box-shadow: var(--ui-shadow-md);
    transform: translateY(-3px);
    text-decoration: none;
  }

  .ci-home .ci-tool-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--ui-ocean-soft);
    color: var(--ui-ocean);
    flex: none;
  }

  /* Category color coding for instant visual scanability & warmth */
  .ci-home .ci-tool[data-group="Measurements"] .ci-tool-icon { background: #fff0ea; color: #c84b2e; }
  .ci-home .ci-tool[data-group="Files & media"] .ci-tool-icon { background: #e6f4f7; color: #14637a; }
  .ci-home .ci-tool[data-group="Business"] .ci-tool-icon { background: #fef4e3; color: #b46214; }
  .ci-home .ci-tool[data-group="Money"] .ci-tool-icon { background: #e9f6ef; color: #19734a; }
  .ci-home .ci-tool[data-group="Automotive"] .ci-tool-icon { background: #eef1fa; color: #3852a3; }
  .ci-home .ci-tool[data-group="Kitchen"] .ci-tool-icon { background: #fceef3; color: #b13b5e; }
  .ci-home .ci-tool[data-group="Time & space"] .ci-tool-icon { background: #f3eefb; color: #6941a3; }

  .ci-home .ci-tool h3 {
    font-family: var(--ui-font);
    font-size: 16.5px;
    font-weight: 700;
    color: var(--ui-ink);
    margin: 0 0 6px;
  }

  .ci-home .ci-tool p {
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--ui-muted);
  }

  .ci-home .ci-tool > svg {
    margin-left: auto;
    color: var(--ui-line-strong);
    transition: transform 0.16s ease, color 0.16s ease;
  }

  .ci-home .ci-tool:hover > svg {
    color: var(--ui-coral);
    transform: translateX(3px);
  }

  .ci-home .ci-tool[data-paused="true"] {
    background: var(--ui-surface-subtle);
    border-style: dashed;
    opacity: 0.82;
  }

  .ci-home .ci-review {
    display: inline-block;
    margin-top: 8px;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--ui-coral-soft);
    color: var(--ui-coral-ink);
    font-size: 11px;
    font-weight: 700;
  }

  /* =====================================================================
     4. TOOL PAGES: WARM STUDIO WORKSPACE, HERO ANSWER & INVITING CONTROLS
     ===================================================================== */
  body[data-tool] .fw-header ~ main {
    max-width: 1220px;
    padding: 30px 24px 52px;
  }

  body[data-tool] .breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ui-muted);
    margin: 0 0 12px;
  }

  body[data-tool] .breadcrumb a {
    color: var(--ui-coral-ink);
    font-weight: 650;
    text-decoration: none;
  }

  body[data-tool] .breadcrumb a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
  }

  body[data-tool] .fw-header ~ main h1 {
    font-family: var(--ui-font);
    font-weight: 800;
    font-size: clamp(30px, 3.6vw, 44px);
    letter-spacing: -0.04em;
    line-height: 1.1;
    color: var(--ui-ocean-deep);
    margin: 0 0 10px;
  }

  body[data-tool] .fw-header ~ main > .intro {
    font-size: 17px;
    line-height: 1.55;
    color: var(--ui-muted);
    margin: 0 0 12px;
    max-width: 70ch;
  }

  body[data-tool] .fw-header ~ main > .muted {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 6px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--ui-line);
    font-size: 12.5px;
    font-weight: 500;
    color: var(--ui-muted);
    margin: 0 0 26px;
  }

  /* Tactile elevated input card + sunlit coastal result card */
  body[data-tool] .fw-header ~ main > form,
  body[data-tool] .fw-header ~ main > .result,
  body[data-tool] .fw-header ~ main > #matResult {
    border: 1px solid var(--ui-line);
    border-radius: var(--ui-radius-xl);
    padding: 28px;
    box-shadow: var(--ui-shadow-sm);
  }

  body[data-tool] .fw-header ~ main > form {
    background: var(--ui-surface);
    align-self: start;
  }

  body[data-tool] .fw-header ~ main > .result,
  body[data-tool] .fw-header ~ main > #matResult {
    background: linear-gradient(168deg, #ffffff 0%, #fcf6ef 52%, #eef6f9 100%);
    border-color: #dfd4c7;
    border-top: 4px solid var(--ui-coral);
    align-self: start;
    box-shadow: var(--ui-shadow-md);
  }

  body[data-tool] .fw-header ~ main h2 {
    font-family: var(--ui-font);
    font-weight: 750;
    letter-spacing: -0.025em;
    color: var(--ui-ocean-deep);
  }

  /* Tabular numerals across every numeric readout */
  body[data-tool] .answer,
  body[data-tool] .results-grid dd,
  body[data-tool] .result input[readonly],
  body[data-tool] .aggregate-order p,
  body[data-tool] .concrete-order p,
  body[data-tool] .totals strong,
  body[data-tool] table td {
    font-variant-numeric: tabular-nums;
  }

  /* Dramatic Deep Ocean hero answer pill */
  body[data-tool] .answer {
    background: linear-gradient(135deg, #123a4f 0%, #1c5673 100%);
    color: #ffffff;
    border-radius: 16px;
    padding: 22px 20px;
    box-shadow: 0 12px 28px -12px rgba(18, 58, 79, 0.50);
    font-family: var(--ui-font);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 16px 0 22px;
  }

  body[data-tool] .results-grid > div {
    border-top: 1px solid #e6ddd2;
    padding: 12px 0;
  }

  body[data-tool] .results-grid dt {
    color: var(--ui-muted);
  }

  body[data-tool] .results-grid dd {
    color: var(--ui-ink);
    font-weight: 700;
  }

  /* Warm tactile form controls */
  body[data-tool] .fw-header ~ main input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="color"]),
  body[data-tool] .fw-header ~ main select,
  body[data-tool] .fw-header ~ main textarea {
    border: 1.5px solid var(--ui-line-strong);
    border-radius: var(--ui-radius-md);
    background: var(--ui-surface-warm);
    color: var(--ui-ink);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  }

  body[data-tool] .fw-header ~ main input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="color"]):hover,
  body[data-tool] .fw-header ~ main select:hover,
  body[data-tool] .fw-header ~ main textarea:hover {
    border-color: #a89989;
    background: var(--ui-surface);
  }

  body[data-tool] .fw-header ~ main input:focus-visible,
  body[data-tool] .fw-header ~ main select:focus-visible,
  body[data-tool] .fw-header ~ main textarea:focus-visible {
    background: var(--ui-surface);
    border-color: var(--ui-coral);
    outline: 2px solid var(--ui-coral);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(226, 98, 69, 0.16);
  }

  /* Warm inviting dropzone for file, PDF, image & media converters */
  body[data-tool] .fw-header ~ main form input[type="file"] {
    width: 100%;
    padding: 22px 18px;
    border: 2px dashed #d3b8a6;
    border-radius: 15px;
    background: linear-gradient(180deg, #fffcf8 0%, #faf2e9 100%);
    color: var(--ui-ink);
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
  }

  body[data-tool] .fw-header ~ main form input[type="file"]:hover {
    border-color: var(--ui-coral);
    background: var(--ui-coral-soft);
    box-shadow: 0 6px 18px -10px rgba(226, 98, 69, 0.35);
  }

  body[data-tool] .fw-header ~ main form input[type="file"]::file-selector-button {
    margin-right: 14px;
    padding: 9px 16px;
    border: 0;
    border-radius: 9px;
    background: var(--ui-coral);
    color: #ffffff;
    font-family: var(--ui-font);
    font-size: 13.5px;
    font-weight: 650;
    cursor: pointer;
    box-shadow: var(--ui-shadow-coral);
    transition: background-color 0.15s ease;
  }

  body[data-tool] .fw-header ~ main form input[type="file"]::file-selector-button:hover {
    background: var(--ui-coral-hover);
  }

  /* Inviting Coral primary form/action CTAs + Deep Ocean download/export CTAs */
  body[data-tool] .fw-header ~ main button.primary,
  body[data-tool] .fw-header ~ main button.primary[type="submit"]:enabled,
  body[data-tool] #matCalculate {
    background: var(--ui-coral);
    border: 1px solid var(--ui-coral);
    color: #ffffff;
    border-radius: 12px;
    font-family: var(--ui-font);
    font-weight: 700;
    letter-spacing: -0.01em;
    box-shadow: var(--ui-shadow-coral);
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.14s ease, box-shadow 0.15s ease;
  }

  body[data-tool] .fw-header ~ main button.primary:hover:enabled,
  body[data-tool] .fw-header ~ main button.primary[type="submit"]:enabled:hover,
  body[data-tool] #matCalculate:hover:enabled {
    background: var(--ui-coral-hover);
    border-color: var(--ui-coral-hover);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px -6px rgba(226, 98, 69, 0.55);
    text-decoration: none;
  }

  body[data-tool] .fw-header ~ main a.primary,
  body[data-tool] #matDownload,
  body[data-tool] #projectDownload,
  body[data-tool] #pdfDownload,
  body[data-tool] #imageDownload,
  body[data-tool] #sheetDownload,
  body[data-tool] #mediaDownload,
  body[data-tool] #xmlDownload,
  body[data-tool] #dataDownload {
    background: var(--ui-ocean);
    border: 1px solid var(--ui-ocean);
    color: #ffffff;
    border-radius: 12px;
    font-family: var(--ui-font);
    font-weight: 700;
    box-shadow: 0 6px 16px -6px rgba(21, 68, 92, 0.45);
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.14s ease;
  }

  body[data-tool] .fw-header ~ main a.primary:hover,
  body[data-tool] #matDownload:hover,
  body[data-tool] #projectDownload:hover,
  body[data-tool] #pdfDownload:hover,
  body[data-tool] #imageDownload:hover,
  body[data-tool] #sheetDownload:hover,
  body[data-tool] #mediaDownload:hover,
  body[data-tool] #xmlDownload:hover,
  body[data-tool] #dataDownload:hover {
    background: var(--ui-ocean-hover);
    border-color: var(--ui-ocean-hover);
    color: #ffffff;
    transform: translateY(-1px);
    text-decoration: none;
  }

  body[data-tool] .fw-header ~ main .actions {
    align-items: stretch;
  }

  body[data-tool] .fw-header ~ main .actions button,
  body[data-tool] .fw-header ~ main .actions button.primary,
  body[data-tool] .fw-header ~ main .actions a.primary {
    margin-top: 0;
  }

  body[data-tool] .fw-header ~ main .actions button:not(.primary) {
    background: var(--ui-surface);
    color: var(--ui-ocean);
    border: 1px solid var(--ui-line-strong);
    border-radius: 11px;
    font-family: var(--ui-font);
    font-weight: 650;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  }

  body[data-tool] .fw-header ~ main .actions button:not(.primary):hover {
    background: var(--ui-coral-soft);
    border-color: var(--ui-coral);
    color: var(--ui-coral-ink);
  }

  /* Warm collapsible example & help drawers */
  body[data-tool] .measurement-examples,
  body[data-tool] .cost-input-help {
    border: 1px solid var(--ui-line);
    border-radius: 13px;
    background: var(--ui-surface-tint);
    padding: 10px 15px;
    margin: 0 0 18px;
  }

  body[data-tool] .measurement-examples summary,
  body[data-tool] .cost-input-help summary {
    color: var(--ui-coral-ink);
    font-family: var(--ui-font);
    font-size: 14px;
    font-weight: 700;
  }

  /* =====================================================================
     5. HARMONIZE MATERIALS, AGGREGATE, CONCRETE & DOCUMENT STUDIO
     ===================================================================== */
  body[data-tool="crushed-stone"] .aggregate-order > div,
  .concrete-order > div {
    border: 1px solid var(--ui-line);
    border-top: 3px solid var(--ui-ocean);
    border-radius: 14px;
    background: var(--ui-surface);
    box-shadow: 0 4px 12px -6px rgba(20, 44, 61, 0.08);
  }

  body[data-tool="crushed-stone"] .aggregate-order h3,
  body[data-tool="crushed-stone"] .aggregate-area legend,
  body[data-tool="crushed-stone"] .aggregate-figure strong,
  body[data-tool="crushed-stone"] .aggregate-selected-copy h3,
  body[data-tool="crushed-stone"] .aggregate-guide-heading h2,
  body[data-tool="crushed-stone"] .aggregate-card-copy h3,
  .concrete-order h3,
  .concrete-area legend,
  .concrete-chosen,
  .concrete-figure strong {
    font-family: var(--ui-font);
    color: var(--ui-ink);
  }

  body[data-tool="crushed-stone"] .aggregate-order p,
  .concrete-order p {
    font-family: var(--ui-font);
    font-weight: 800;
    color: var(--ui-ocean);
  }

  body[data-tool="crushed-stone"] .aggregate-order span,
  body[data-tool="crushed-stone"] .aggregate-figure figcaption,
  body[data-tool="crushed-stone"] .aggregate-selected-copy > p:not(.aggregate-eyebrow),
  body[data-tool="crushed-stone"] .aggregate-guide-heading > p,
  body[data-tool="crushed-stone"] .aggregate-guide-note,
  body[data-tool="crushed-stone"] .aggregate-card-copy p,
  .concrete-order span,
  .concrete-figure figcaption {
    color: var(--ui-muted);
  }

  body[data-tool="crushed-stone"] .aggregate-area,
  body[data-tool="crushed-stone"] .aggregate-figure,
  body[data-tool="crushed-stone"] #aggregateSelectedMaterial,
  body[data-tool="crushed-stone"] .aggregate-material-card,
  .concrete-area,
  .concrete-figure {
    border-color: var(--ui-line);
    border-radius: 14px;
    background: var(--ui-surface);
  }

  body[data-tool="crushed-stone"] .aggregate-figure,
  .concrete-figure {
    background: var(--ui-surface-tint);
  }

  body[data-tool="crushed-stone"] #aggregateAddArea,
  #concreteAddArea {
    border-color: #d3b8a6;
    border-radius: 11px;
    background: var(--ui-surface-tint);
    color: var(--ui-coral-ink);
  }

  body[data-tool="crushed-stone"] #aggregateAddArea:hover,
  #concreteAddArea:hover {
    background: var(--ui-coral-soft);
    border-color: var(--ui-coral);
  }

  body[data-tool="crushed-stone"] .aggregate-material-card[data-selected="true"],
  .concrete-order [data-selected="true"] {
    border-color: var(--ui-coral);
    background: var(--ui-coral-soft);
    box-shadow: 0 0 0 2px rgba(226, 98, 69, 0.25);
  }

  body[data-tool="crushed-stone"] .aggregate-card-copy button,
  body[data-tool="crushed-stone"] #aggregateZoom,
  body[data-tool="crushed-stone"] #aggregateCloseImage,
  body[data-tool="concrete-volume"] .concrete-print {
    background: var(--ui-surface);
    border-color: var(--ui-line-strong);
    border-radius: 10px;
    color: var(--ui-ocean);
  }

  body[data-tool="crushed-stone"] #aggregateAreaBreakdown,
  body[data-tool="crushed-stone"] .aggregate-gallery,
  #concreteAreaBreakdown,
  #concreteCostResult {
    border-top-color: var(--ui-line);
  }

  #concreteCostResult tr[data-selected="true"] {
    background: var(--ui-coral-soft);
  }

  body[data-tool] .aggregate-account-panel {
    background: var(--ui-surface);
    border: 1px solid var(--ui-line);
    border-radius: 16px;
    box-shadow: var(--ui-shadow-sm);
  }

  body[data-tool] #aggregateSavedList li,
  body[data-tool] .aggregate-rating-panel,
  body[data-tool] .aggregate-rating-panel fieldset {
    border-color: var(--ui-line);
  }

  body[data-tool] #aggregateFavorite[aria-pressed="true"],
  body[data-tool] .aggregate-rating-options label:has(input:checked) {
    background: var(--ui-coral-soft);
    border-color: var(--ui-coral);
    outline-color: var(--ui-coral);
  }

  /* Warm Document Studio Chrome (screen only; print stays untouched) */
  body[data-tool]:has(.site-header) main {
    max-width: 1360px;
    padding: 26px max(24px, 3%) 56px;
  }

  body[data-tool]:has(.site-header) .page-heading h1,
  body[data-tool]:has(.site-header) .editor-section h2,
  body[data-tool]:has(.site-header) .history h2 {
    font-family: var(--ui-font);
    font-weight: 800;
    color: var(--ui-ocean-deep);
  }

  body[data-tool]:has(.site-header) .view-switch {
    background: var(--ui-canvas-warm);
    border: 1px solid var(--ui-line);
    border-radius: 12px;
    padding: 4px;
  }

  body[data-tool]:has(.site-header) .view-switch button {
    border-radius: 9px;
    font-family: var(--ui-font);
    font-weight: 650;
  }

  body[data-tool]:has(.site-header) .view-switch button[aria-pressed="true"] {
    background: var(--ui-ocean);
    color: #ffffff;
  }

  body[data-tool]:has(.site-header) .document-settings,
  body[data-tool]:has(.site-header) .formatting {
    background: var(--ui-surface);
    border: 1px solid var(--ui-line);
    border-radius: 14px;
    box-shadow: var(--ui-shadow-sm);
  }

  body[data-tool]:has(.site-header) .editor-section {
    background: var(--ui-surface);
    border-color: var(--ui-line);
    border-radius: 16px;
    box-shadow: var(--ui-shadow-sm);
  }

  body[data-tool]:has(.site-header) .preview-panel {
    background: #ece4d9;
    border: 1px solid #dfd4c5;
    border-radius: 18px;
  }

  body[data-tool]:has(.site-header) .paper {
    border-radius: 6px;
    box-shadow: 0 14px 36px rgba(20, 44, 61, 0.14);
  }

  body[data-tool]:has(.site-header) .history {
    background: var(--ui-surface);
    border: 1px solid var(--ui-line);
    border-radius: 16px;
    box-shadow: var(--ui-shadow-sm);
  }

  body[data-tool]:has(.site-header) .toolbar button:not(.primary),
  body[data-tool]:has(.site-header) .file-button,
  body[data-tool]:has(.site-header) .document-actions button {
    border-color: var(--ui-line-strong);
    border-radius: 10px;
    font-family: var(--ui-font);
    font-weight: 650;
  }

  /* Clean warm below-the-fold guides */
  body[data-tool] .explanation,
  .ci-conversion-guide,
  .ci-organic-guide,
  .ci-document-guide {
    border-top: 1px solid var(--ui-line);
    margin-top: 36px;
    padding-top: 28px;
  }

  .ci-conversion-guide caption,
  .ci-organic-guide h2,
  .ci-conversion-guide h2 {
    color: var(--ui-ocean-deep);
    font-family: var(--ui-font);
  }

  .ci-conversion-guide thead,
  .data-preview th {
    background: var(--ui-surface-tint);
    color: var(--ui-ink);
  }

  .ci-conversion-guide th,
  .ci-conversion-guide td {
    border-bottom-color: var(--ui-line);
  }

  .ci-conversion-guide .ci-reference-note {
    color: var(--ui-muted);
  }

  /* =====================================================================
     6. MOBILE STICKY RESULT BAR (CALCULATORS <= 820PX)
     ===================================================================== */
  .ui-mobile-result {
    display: none;
  }

  /* =====================================================================
     7. RICH DEEP-OCEAN 4-COLUMN UTILITY FOOTER
     ===================================================================== */
  .ci-footer.ui-footer,
  .ui-footer {
    display: block;
    background: linear-gradient(180deg, #13394e 0%, #0f2d3e 100%);
    border-top: 4px solid var(--ui-coral);
    margin-top: 64px;
    padding: 46px max(24px, calc((100% - 1220px) / 2)) 32px;
    color: #e6eff4;
    text-align: left;
  }

  .ui-footer-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1.35fr) repeat(4, minmax(0, 1fr));
    gap: 30px;
    max-width: 1220px;
    margin: 0 auto 32px;
  }

  .ui-footer-brand .fw-brand {
    display: inline-flex;
    background: #ffffff;
    padding: 6px 14px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
  }

  .ui-footer-brand p {
    font-size: 13.5px;
    line-height: 1.6;
    color: #b7ccd8;
    margin: 14px 0 0;
    max-width: 30ch;
  }

  .ui-footer-brand .ocean-logo {
    width: 176px;
    height: 38px;
    transform: none;
    margin: 0;
  }

  .ui-footer-brand .ocean-logo img {
    width: 204px;
    left: -14px;
    top: -47px;
  }

  .ui-footer-col h2 {
    font-family: var(--ui-font);
    font-size: 12px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #f4a08b;
    margin: 0 0 13px;
  }

  .ui-footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 7px;
  }

  .ui-footer-col a {
    display: inline-block;
    font-size: 13.5px;
    color: #e6eff4;
    text-decoration: none;
    padding: 3px 0;
    transition: color 0.15s ease;
  }

  .ui-footer-col a:hover {
    color: #ffd3c7;
    text-decoration: underline;
    text-underline-offset: 4px;
  }

  .ui-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 1220px;
    margin: 0 auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 13px;
    color: #b7ccd8;
  }

  .ui-footer-bottom p {
    margin: 0;
    color: #b7ccd8;
  }

  .ui-footer .ci-reference-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
  }

  .ui-footer .ci-reference-links a {
    font-size: 13px;
    color: #ffd3c7;
    text-decoration: none;
    font-weight: 600;
  }

  .ui-footer .ci-reference-links a:hover {
    color: #ffffff;
    text-decoration: underline;
  }
}

/* =====================================================================
   8. RESPONSIVE BREAKPOINTS (ZERO OVERFLOW DOWN TO 320PX)
   ===================================================================== */
@media screen and (max-width: 1000px) {
  .fw-header .fw-links {
    display: none;
  }

  .fw-header .fw-menu {
    display: block;
    margin-left: 0;
  }

  .fw-header .ui-quick-trigger {
    margin-left: auto;
  }

  .fw-header:not(:has(.ui-quick-trigger)) .fw-menu {
    margin-left: auto;
  }

  .wb-lanes {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .ci-home .ci-browse-layout .ci-tool-grid,
  .ci-home .ci-tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ui-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ui-footer-brand {
    grid-column: 1 / -1;
  }
}

@media screen and (max-width: 820px) {
  body[data-tool] .fw-header ~ main > .result,
  body[data-tool] .fw-header ~ main > #matResult {
    position: static;
  }

  .ui-mobile-result {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 35;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 15px;
    background: linear-gradient(135deg, #133c52 0%, #1b5673 100%);
    color: #ffffff;
    box-shadow: 0 14px 32px rgba(10, 32, 48, 0.34);
    font-family: var(--ui-font);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    width: calc(100% - 24px);
    text-align: left;
  }

  .ui-mobile-result[hidden] {
    display: none;
  }

  .ui-mobile-result strong {
    font-variant-numeric: tabular-nums;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .ui-mobile-result span {
    flex: none;
    font-size: 12px;
    padding: 4px 11px;
    border-radius: 999px;
    background: var(--ui-coral);
    color: #ffffff;
  }
}

@media screen and (max-width: 650px) {
  header.fw-header,
  .ci-home header.fw-header {
    min-height: 60px;
    padding: 6px 14px;
    gap: 8px;
  }

  .ci-home .fw-header .ocean-logo,
  .fw-header .ocean-logo {
    width: 158px;
    height: 36px;
  }

  .ci-home .fw-header .ocean-logo img,
  .fw-brand .ocean-logo img {
    width: 184px;
    left: -13px;
    top: -42px;
  }

  .ui-quick-trigger {
    padding: 6px 10px;
    min-height: 38px;
  }

  .ui-quick-trigger kbd,
  .ui-quick-trigger .ui-quick-text {
    display: none;
  }

  .wb-lanes {
    padding: 18px 16px 6px;
  }

  .wb-lanes a,
  .wb-lanes a + a {
    padding: 15px 16px;
    border-radius: 15px;
  }

  .ci-home .ci-browse-layout {
    padding: 20px 16px 36px;
  }

  .ci-home .ci-bundles {
    padding: 12px;
    gap: 6px;
  }

  .ci-home .ci-browse-layout .ci-tool-grid,
  .ci-home .ci-tool-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  body[data-tool] .fw-header ~ main {
    padding: 20px 16px 36px;
  }

  body[data-tool] .fw-header ~ main > form,
  body[data-tool] .fw-header ~ main > .result,
  body[data-tool] .fw-header ~ main > #matResult {
    padding: 20px;
  }

  .ci-footer.ui-footer,
  .ui-footer {
    padding: 32px 16px 24px;
  }

  .ui-footer-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

@media screen and (max-width: 360px) {
  .ci-home .fw-header .ocean-logo,
  .fw-header .ocean-logo {
    width: 132px;
    height: 32px;
  }

  .ci-home .fw-header .ocean-logo img,
  .fw-brand .ocean-logo img {
    width: 154px;
    left: -11px;
    top: -35px;
  }

  .fw-menu summary {
    padding: 0 9px;
    font-size: 12px;
  }
}

/* =====================================================================
   9. GOAL UPGRADES: ABOVE-THE-FOLD DECLUTTER, HERO LAUNCHER & ARCHETYPE UX
   ===================================================================== */
@media screen {
  /* Item 1A: Compact Aggregate Account Strip (pulls calculator above the fold) */
  body[data-tool] .aggregate-account-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    padding: 10px 16px;
    margin: 0 0 18px;
  }

  body[data-tool] .aggregate-account-panel .aggregate-account-bar {
    gap: 8px;
  }

  body[data-tool] .aggregate-account-panel .aggregate-account-bar button {
    min-height: 36px;
    padding: 6px 12px;
    font-size: 13px;
  }

  body[data-tool] .aggregate-account-panel > p {
    margin: 0;
    font-size: 12.5px;
    color: var(--ui-muted);
  }

  body[data-tool] .aggregate-account-panel details {
    margin: 0;
    padding: 0;
    border: 0;
  }

  body[data-tool] .aggregate-account-panel details[open] {
    flex-basis: 100%;
    padding-top: 10px;
    border-top: 1px solid var(--ui-line);
  }

  body[data-tool] .aggregate-account-panel details summary {
    font-size: 13px;
    padding: 4px 10px;
    border-radius: 8px;
    background: var(--ui-surface-subtle);
    color: var(--ui-ocean);
  }

  /* Item 1B: Decluttered Document Studio Ribbon (pulls editable paper above the fold) */
  body[data-tool]:has(.site-header) main {
    padding: 12px max(24px, 3%) 48px;
  }

  body[data-tool]:has(.site-header) .breadcrumb {
    margin: 0 0 4px;
    font-size: 12px;
  }

  body[data-tool]:has(.site-header) .page-heading {
    margin-bottom: 4px;
    align-items: center;
  }

  body[data-tool]:has(.site-header) .page-heading h1 {
    font-size: clamp(24px, 2.5vw, 30px);
    margin: 0 0 2px;
  }

  body[data-tool]:has(.site-header) .page-heading p:not(.breadcrumb) {
    font-size: 13px;
    color: var(--ui-muted);
    margin: 0;
  }

  body[data-tool]:has(.site-header) main > .privacy {
    display: inline-block;
    padding: 3px 10px;
    margin: 2px 0 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--ui-line);
    font-size: 11.5px;
  }

  body[data-tool]:has(.site-header) #documentInputHelp {
    display: block;
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0 0 6px;
    font-size: 12px;
  }

  body[data-tool]:has(.site-header) #status:empty {
    display: none;
    min-height: 0;
    margin: 0;
  }

  body[data-tool]:has(.site-header) .ci-document-handoff {
    padding: 8px 14px;
    margin: 0 0 8px;
    border-radius: 12px;
    border-color: var(--ui-line);
    background: var(--ui-surface-warm);
    gap: 6px 14px;
  }

  body[data-tool]:has(.site-header) .ci-document-handoff h2 {
    font-family: var(--ui-font);
    font-size: 13.5px;
    margin: 0 0 1px;
    color: var(--ui-ocean-deep);
  }

  body[data-tool]:has(.site-header) .ci-document-handoff p {
    font-size: 12px;
    line-height: 1.35;
    color: var(--ui-muted);
  }

  body[data-tool]:has(.site-header) .ci-document-handoff button {
    min-height: 36px;
    padding: 6px 13px;
    font-size: 12.5px;
  }

  body[data-tool]:has(.site-header) .workspace-tools {
    margin: 4px 0 8px;
    gap: 8px;
    align-items: center;
  }

  body[data-tool]:has(.site-header) .workspace-tools button,
  body[data-tool]:has(.site-header) .workspace-tools .file-button {
    padding: 7px 12px;
    font-size: 12.5px;
  }

  body[data-tool]:has(.site-header) .document-settings {
    padding: 8px 14px;
    margin: 0 0 10px;
    gap: 8px 14px;
  }

  body[data-tool]:has(.site-header) .preview-panel {
    padding: 14px 20px 22px;
  }

  body[data-tool]:has(.site-header) .preview-heading {
    margin-bottom: 6px;
  }

  body[data-tool]:has(.site-header) .document-help {
    margin-bottom: 10px;
    font-size: 12px;
  }

  body[data-tool]:has(.site-header) .document-settings > label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: none;
    margin: 0;
    font-size: 12.5px;
  }

  body[data-tool]:has(.site-header) .document-settings > label select {
    width: auto;
    min-height: 36px;
    padding: 5px 10px;
    margin: 0;
  }

  .ui-appearance-swatches {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
  }

  button.ui-swatch-dot {
    width: 26px;
    height: 26px;
    min-height: 26px;
    padding: 0;
    margin: 0;
    border-radius: 999px;
    border: 2px solid #ffffff;
    background: var(--swatch-color, #15445c);
    box-shadow: 0 0 0 1px rgba(20, 44, 61, 0.25);
    cursor: pointer;
    transition: transform 0.14s ease, box-shadow 0.14s ease;
  }

  button.ui-swatch-dot:hover {
    background: var(--swatch-color, #15445c);
    transform: scale(1.14);
  }

  button.ui-swatch-dot[aria-pressed="true"] {
    box-shadow: 0 0 0 2.5px var(--ui-coral);
    transform: scale(1.14);
  }

  /* Item 2: Homepage Real Interactive Launcher inside .wb-panel */
  .wb-launcher {
    margin-top: 18px;
  }

  .wb-drop-launcher {
    position: relative;
    border: 2px dashed #d3b8a6;
    border-radius: 16px;
    padding: 14px;
    background: linear-gradient(180deg, #fffcf8 0%, #faf2e9 100%);
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
  }

  .wb-drop-launcher:hover,
  .wb-drop-launcher.is-dragover {
    border-color: var(--ui-coral);
    background: var(--ui-coral-soft);
    box-shadow: 0 8px 20px -10px rgba(226, 98, 69, 0.35);
  }

  .wb-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .wb-drop-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    margin: 0;
  }

  .wb-drop-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--ui-surface);
    color: var(--ui-coral);
    border: 1px solid var(--ui-line);
  }

  .wb-drop-label strong {
    display: block;
    font-family: var(--ui-font);
    font-size: 14.5px;
    font-weight: 700;
    color: var(--ui-ink);
  }

  .wb-drop-label small {
    display: block;
    font-size: 12px;
    color: var(--ui-muted);
    margin-top: 2px;
  }

  .wb-format-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(211, 184, 166, 0.5);
  }

  .wb-format-pills button {
    width: auto;
    min-height: 32px;
    padding: 4px 11px;
    margin: 0;
    border: 1px solid var(--ui-line-strong);
    border-radius: 999px;
    background: var(--ui-surface);
    color: var(--ui-ink);
    font-family: var(--ui-font);
    font-size: 12px;
    font-weight: 650;
  }

  .wb-format-pills button:hover,
  .wb-format-pills button[aria-pressed="true"] {
    background: var(--ui-ocean);
    border-color: var(--ui-ocean);
    color: #ffffff;
  }

  .wb-match-status {
    margin-top: 10px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ui-ocean-deep);
  }

  .wb-match-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
  }

  .wb-match-links a {
    display: inline-flex;
    align-items: center;
    padding: 5px 11px;
    border-radius: 9px;
    background: var(--ui-ocean);
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 650;
    text-decoration: none;
  }

  .wb-match-links a:hover {
    background: var(--ui-coral);
    text-decoration: none;
  }

  /* Numbers Mini-Calc inside Hero Panel */
  .wb-mini-calc {
    border: 1px solid var(--ui-line);
    border-radius: 16px;
    padding: 14px;
    background: var(--ui-surface-tint);
  }

  .wb-mini-title {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ui-muted);
  }

  .wb-mini-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 84px;
    gap: 8px;
  }

  .wb-mini-grid label {
    display: block;
    font-size: 11.5px;
    font-weight: 650;
    color: var(--ui-muted);
    margin: 0 0 4px;
  }

  .wb-mini-grid input,
  .wb-mini-grid select {
    width: 100%;
    min-height: 40px;
    padding: 6px 10px;
    border: 1px solid var(--ui-line-strong);
    border-radius: 10px;
    background: var(--ui-surface);
    color: var(--ui-ink);
    font-size: 14px;
    font-weight: 650;
  }

  .wb-mini-grid input:focus-visible,
  .wb-mini-grid select:focus-visible {
    border-color: var(--ui-coral);
    outline: 2px solid var(--ui-coral);
    outline-offset: 2px;
  }

  .wb-mini-output {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, #123a4f 0%, #1c5673 100%);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .wb-mini-output strong {
    font-size: 22px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
  }

  .wb-mini-output span {
    font-size: 12px;
    color: #cde0eb;
  }

  /* Documents Quick-Start Cards inside Hero Panel */
  .wb-doc-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .wb-doc-card {
    display: block;
    padding: 10px 12px;
    border: 1px solid var(--ui-line);
    border-radius: 12px;
    background: var(--ui-surface-tint);
    color: var(--ui-ink);
    text-decoration: none;
    transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
  }

  .wb-doc-card:hover {
    border-color: var(--ui-coral);
    background: var(--ui-coral-soft);
    transform: translateY(-1px);
    text-decoration: none;
  }

  .wb-doc-card strong {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--ui-ocean-deep);
  }

  .wb-doc-card small {
    display: block;
    font-size: 11.5px;
    color: var(--ui-muted);
    margin-top: 2px;
  }

  /* Item 3A: Fused [ value | unit ] calculator inputs + 1-click Copy buttons */
  body[data-tool] .dimension,
  body[data-tool] .mat-dimension {
    gap: 0 !important;
    border: 1.5px solid var(--ui-line-strong);
    border-radius: var(--ui-radius-md);
    background: var(--ui-surface-warm);
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
  }

  body[data-tool] .dimension:focus-within,
  body[data-tool] .mat-dimension:focus-within {
    border-color: var(--ui-coral);
    box-shadow: 0 0 0 4px rgba(226, 98, 69, 0.16);
    background: var(--ui-surface);
  }

  body[data-tool] .dimension input,
  body[data-tool] .dimension select,
  body[data-tool] .mat-dimension input,
  body[data-tool] .mat-dimension select {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
  }

  body[data-tool] .dimension input:focus-visible,
  body[data-tool] .dimension select:focus-visible,
  body[data-tool] .mat-dimension input:focus-visible,
  body[data-tool] .mat-dimension select:focus-visible {
    outline: none !important;
    box-shadow: none !important;
  }

  body[data-tool] .dimension select,
  body[data-tool] .mat-dimension select {
    border-left: 1px solid var(--ui-line) !important;
    background: var(--ui-surface-subtle) !important;
    font-weight: 600;
    color: var(--ui-ocean-deep);
  }

  body[data-tool] .results-grid > div {
    align-items: center;
  }

  body[data-tool] .results-grid > div dd {
    margin-left: auto;
  }

  button.ui-copy-row {
    flex: none;
    width: auto;
    min-height: 28px;
    padding: 3px 9px;
    margin: 0 0 0 8px;
    border: 1px solid var(--ui-line-strong);
    border-radius: 7px;
    background: var(--ui-surface);
    color: var(--ui-ocean);
    font-family: var(--ui-font);
    font-size: 11.5px;
    font-weight: 650;
    cursor: pointer;
    transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
  }

  button.ui-copy-row:hover {
    background: var(--ui-coral-soft);
    border-color: var(--ui-coral);
    color: var(--ui-coral-ink);
  }

  button.ui-copy-row[data-copied="true"],
  button.ui-answer-copy[data-copied="true"] {
    background: #19734a;
    border-color: #19734a;
    color: #ffffff;
  }

  button.ui-answer-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-height: 32px;
    padding: 4px 12px;
    margin: -10px auto 16px;
    border: 1px solid var(--ui-line-strong);
    border-radius: 999px;
    background: var(--ui-surface);
    color: var(--ui-ocean);
    font-family: var(--ui-font);
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
  }

  button.ui-answer-copy:hover {
    background: var(--ui-coral-soft);
    border-color: var(--ui-coral);
    color: var(--ui-coral-ink);
  }

  /* Item 3B: Converter 3-Step Stepper, Drag-Drop Glow, File Chips & Sample Button */
  ol.ui-stepper {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
    padding: 0;
  }

  ol.ui-stepper li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px 5px 7px;
    border-radius: 999px;
    border: 1px solid var(--ui-line);
    background: var(--ui-canvas);
    color: var(--ui-muted);
    font-family: var(--ui-font);
    font-size: 12px;
    font-weight: 650;
  }

  ol.ui-stepper li span {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: var(--ui-line);
    color: var(--ui-ink);
    font-size: 11px;
    font-weight: 800;
  }

  ol.ui-stepper li[data-state="active"] {
    background: var(--ui-coral-soft);
    border-color: var(--ui-coral);
    color: var(--ui-coral-ink);
  }

  ol.ui-stepper li[data-state="active"] span {
    background: var(--ui-coral);
    color: #ffffff;
  }

  ol.ui-stepper li[data-state="done"] {
    background: var(--ui-ocean-soft);
    border-color: var(--ui-ocean);
    color: var(--ui-ocean);
  }

  ol.ui-stepper li[data-state="done"] span {
    background: var(--ui-ocean);
    color: #ffffff;
  }

  .ui-drop-active input[type="file"] {
    border-color: var(--ui-coral) !important;
    background: var(--ui-coral-soft) !important;
    box-shadow: 0 0 0 4px rgba(226, 98, 69, 0.22) !important;
  }

  button.ui-sample-file-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: auto;
    min-height: 34px;
    padding: 5px 13px;
    margin: 10px 0 4px;
    border: 1px solid var(--ui-line-strong);
    border-radius: 999px;
    background: var(--ui-surface-tint);
    color: var(--ui-ocean);
    font-family: var(--ui-font);
    font-size: 12.5px;
    font-weight: 650;
    cursor: pointer;
  }

  button.ui-sample-file-btn:hover {
    background: var(--ui-coral-soft);
    border-color: var(--ui-coral);
    color: var(--ui-coral-ink);
  }

  .ui-file-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
  }

  .ui-file-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    padding: 6px 11px;
    border: 1px solid var(--ui-line);
    border-radius: 10px;
    background: var(--ui-surface-warm);
    font-size: 12.5px;
  }

  .ui-file-chip strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
    color: var(--ui-ink);
  }

  .ui-file-chip small {
    color: var(--ui-muted);
    font-variant-numeric: tabular-nums;
  }

  .ui-file-ext {
    padding: 2px 6px;
    border-radius: 6px;
    background: var(--ui-ocean);
    color: #ffffff;
    font-size: 10.5px;
    font-weight: 750;
    letter-spacing: 0.04em;
  }

  /* Item 4: Connected Workflow Strips & Handoff Banners */
  .ui-handoff-banner {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 16px;
    margin: 0 0 18px;
    border: 1px solid rgba(226, 98, 69, 0.35);
    border-left: 4px solid var(--ui-coral);
    border-radius: 12px;
    background: var(--ui-coral-soft);
    color: var(--ui-ink);
    font-size: 13.5px;
    font-weight: 600;
  }

  .ui-handoff-banner button {
    width: auto;
    min-height: 32px;
    padding: 4px 11px;
    margin: 0;
    border: 1px solid rgba(166, 58, 33, 0.3);
    border-radius: 8px;
    background: var(--ui-surface);
    color: var(--ui-coral-ink);
    font-size: 12px;
    font-weight: 650;
  }

  .ui-next-strip {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--ui-line);
  }

  .ui-next-title {
    margin: 0 0 10px;
    font-family: var(--ui-font);
    font-size: 12.5px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ui-muted);
  }

  .ui-next-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .ui-next-buttons button,
  .ui-next-buttons a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 7px 13px;
    margin: 0;
    width: auto;
    border: 1px solid var(--ui-line-strong);
    border-radius: 10px;
    background: var(--ui-surface);
    color: var(--ui-ocean);
    font-family: var(--ui-font);
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
  }

  .ui-next-buttons button:hover,
  .ui-next-buttons a:hover {
    background: var(--ui-coral-soft);
    border-color: var(--ui-coral);
    color: var(--ui-coral-ink);
    text-decoration: none;
  }

  /* Item 3C: Mobile Floating Document Preview Toggle (only on <= 700px) */
  .ui-doc-mobile-toggle {
    display: none;
  }
}

@media screen and (max-width: 700px) {
  button.ui-doc-mobile-toggle {
    position: fixed;
    right: 14px;
    bottom: 14px;
    z-index: 36;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 16px;
    margin: 0;
    width: auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    background: linear-gradient(135deg, #133c52 0%, #1b5673 100%);
    color: #ffffff;
    font-family: var(--ui-font);
    font-size: 13.5px;
    font-weight: 700;
    box-shadow: 0 10px 26px rgba(10, 32, 48, 0.34);
    cursor: pointer;
  }

  .wb-mini-grid {
    grid-template-columns: 1fr 1fr;
  }

  .wb-mini-grid > div:last-child {
    grid-column: 1 / -1;
  }

  .wb-doc-grid {
    grid-template-columns: 1fr;
  }
}

/* =====================================================================
   10. PRINT SAFETY: NEVER LEAK NEW CHROME INTO PRINTED PDFS
   ===================================================================== */
@media print {
  .fw-header,
  .ui-quick-trigger,
  dialog.ui-palette,
  .ui-mobile-result,
  .ui-footer,
  .ui-copy-row,
  .ui-answer-copy,
  .ui-next-strip,
  .ui-handoff-banner,
  .ui-stepper,
  .ui-sample-file-btn,
  .ui-file-chips,
  .ui-appearance-swatches,
  .ui-doc-mobile-toggle {
    display: none !important;
  }
}
