  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  :root {
    --bg-1: #f4efe5;
    --bg-2: #ece4d2;
    --surface: rgba(255, 251, 245, 0.84);
    --surface-solid: #fffaf0;
    --surface-2: #f2ebdc;
    --border: rgba(64, 54, 34, 0.16);
    --border-strong: rgba(64, 54, 34, 0.35);
    --text: #1f1a14;
    --text-muted: #5f5648;
    --text-faint: #908570;
    --accent: #2e5a46;
    --accent-strong: #244737;
    --accent-fg: #f8f2e8;
    --sun: #c47a29;
    --sun-soft: #f7d5aa;
    --ocean: #256a73;
    --ocean-soft: #cae9ed;
    --radius: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --shadow: 0 18px 32px rgba(40, 25, 8, 0.1);
  }

  body {
    font-family: 'Manrope', sans-serif;
    min-height: 100vh;
    color: var(--text);
    background:
      radial-gradient(circle at 85% 10%, #f3e2c5 0, transparent 35%),
      radial-gradient(circle at 12% 25%, #d9efde 0, transparent 30%),
      linear-gradient(140deg, var(--bg-1), var(--bg-2));
    font-size: 15px;
    line-height: 1.6;
    padding-bottom: 4rem;
  }

  .ambient {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
  }

  .blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(26px);
    opacity: 0.42;
    animation: floaty 18s ease-in-out infinite;
  }

  .blob.a { width: 280px; height: 280px; background: #f2c698; top: -80px; right: -40px; }
  .blob.b { width: 260px; height: 260px; background: #b7ddbe; bottom: -110px; left: -60px; animation-delay: -5s; }
  .blob.c { width: 200px; height: 200px; background: #afdde4; top: 45%; right: 8%; animation-delay: -9s; }

  @keyframes floaty {
    0%, 100% { transform: translateY(0) translateX(0); }
    50% { transform: translateY(-12px) translateX(8px); }
  }

  .app-wrap {
    position: relative;
    z-index: 1;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 1rem;
  }

  nav {
    margin-top: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--surface);
    backdrop-filter: blur(9px);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.35rem 0.7rem;
    position: sticky;
    top: 12px;
    z-index: 50;
  }

  .nav-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.8rem 0.6rem;
    min-width: 270px;
  }

  .nav-logo {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: linear-gradient(145deg, var(--accent), var(--ocean));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 14px rgba(37, 106, 115, 0.28);
  }

  .nav-logo svg { width: 18px; height: 18px; fill: var(--accent-fg); }

  .brand-copy { display: flex; flex-direction: column; line-height: 1.2; }
  .nav-title {
    font-family: 'Fraunces', serif;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.01em;
  }
  .nav-sub { font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 3px; }

  .nav-tabs {
    margin-left: auto;
    display: flex;
    border: 1px solid var(--border);
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 250, 240, 0.75);
  }

  .nav-tab {
    padding: 0.7rem 1rem;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.18s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    user-select: none;
    border-left: 1px solid var(--border);
  }

  .nav-tab:first-child { border-left: none; }
  .nav-tab:hover { background: rgba(255, 255, 255, 0.7); color: var(--text); }
  .nav-tab.active {
    background: linear-gradient(145deg, var(--accent), var(--accent-strong));
    color: var(--accent-fg);
  }

  .hero {
    margin-top: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background:
      radial-gradient(circle at 12% 0%, rgba(247, 213, 170, 0.5), transparent 35%),
      linear-gradient(155deg, #264d3f, #1d3b4a 60%, #2e5a46);
    color: #fff7ec;
    padding: clamp(1.6rem, 5vw, 2.8rem);
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
  }

  .hero::after {
    content: '';
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 248, 236, 0.09);
    right: -40px;
    top: -70px;
  }

  .hero-eyebrow {
    display: inline-block;
    border: 1px solid rgba(255, 247, 236, 0.4);
    border-radius: 999px;
    padding: 5px 14px;
    font-size: 11px;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: rgba(255, 247, 236, 0.85);
    margin-bottom: 0.8rem;
  }

  .hero h1 {
    font-family: 'Fraunces', serif;
    font-weight: 600;
    line-height: 1.1;
    font-size: clamp(30px, 4vw, 48px);
    max-width: 720px;
    margin-bottom: 0.9rem;
  }

  .hero p {
    max-width: 640px;
    color: rgba(255, 247, 236, 0.87);
    font-size: clamp(14px, 1.75vw, 17px);
  }

  .quick-stats {
    margin-top: 1.1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
  }

  .quick-pill {
    border: 1px solid rgba(255, 247, 236, 0.33);
    border-radius: 999px;
    padding: 5px 11px;
    font-size: 12px;
    color: rgba(255, 247, 236, 0.95);
    background: rgba(255, 247, 236, 0.08);
  }

  main {
    margin-top: 1.2rem;
    display: block;
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
  }

  .page { display: none; animation: fadeIn 0.32s ease; }
  .page.active { display: block; }

  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .page-heading { margin: 0.3rem 0 1.1rem; }
  .page-heading h2 {
    font-family: 'Fraunces', serif;
    font-weight: 600;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.15;
    margin-bottom: 0.3rem;
  }

  .page-heading p { color: var(--text-muted); max-width: 720px; }

  .card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.2rem;
    margin-bottom: 0.95rem;
    backdrop-filter: blur(7px);
    box-shadow: 0 10px 22px rgba(40, 25, 8, 0.06);
  }

  .section-label {
    font-size: 11px;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 9px;
    font-weight: 700;
  }

  .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
  .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

  .field label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 5px;
    font-weight: 600;
  }

  textarea, select, input[type="text"] {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 11px 12px;
    font-size: 14px;
    font-family: 'Manrope', sans-serif;
    color: var(--text);
    background: rgba(255, 252, 247, 0.9);
    line-height: 1.5;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  }

  textarea { resize: vertical; }
  textarea:focus, select:focus, input:focus {
    outline: none;
    border-color: var(--border-strong);
    box-shadow: 0 0 0 3px rgba(46, 90, 70, 0.12);
    background: #fffefb;
  }

  .tags-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 7px; }
  .tag {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--border);
    cursor: pointer;
    color: var(--text-muted);
    background: rgba(255, 250, 240, 0.85);
    transition: all 0.15s ease;
    user-select: none;
  }

  .tag:hover { border-color: var(--border-strong); color: var(--text); transform: translateY(-1px); }
  .tag.active {
    background: linear-gradient(150deg, var(--accent), var(--accent-strong));
    border-color: var(--accent);
    color: var(--accent-fg);
  }

  .btn-primary {
    width: 100%;
    border: none;
    border-radius: 14px;
    padding: 12px;
    margin-top: 0.4rem;
    background: linear-gradient(140deg, var(--accent), var(--ocean));
    color: var(--accent-fg);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.01em;
    transition: transform 0.14s ease, box-shadow 0.14s ease, opacity 0.14s ease;
    box-shadow: 0 10px 20px rgba(31, 74, 58, 0.3);
  }

  .btn-primary:hover { transform: translateY(-1px); }
  .btn-primary:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

  .controls-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 0.55rem;
  }

  .btn-secondary {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 700;
    background: rgba(255, 251, 245, 0.9);
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.14s ease, transform 0.14s ease;
  }

  .btn-secondary:hover { border-color: var(--border-strong); transform: translateY(-1px); }
  .btn-secondary:disabled { opacity: 0.45; cursor: not-allowed; }

  .mini-status {
    font-size: 12px;
    color: var(--text-faint);
    margin-top: 0.45rem;
  }

  .demo-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 0.6rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px 10px 4px 6px;
    background: rgba(255, 250, 240, 0.78);
  }

  .switch {
    position: relative;
    width: 34px;
    height: 20px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #e5dccb;
    cursor: pointer;
    transition: background 0.16s ease;
  }

  .switch::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff8ee;
    border: 1px solid rgba(64, 54, 34, 0.16);
    transition: transform 0.16s ease;
  }

  .switch.on {
    background: linear-gradient(140deg, var(--accent), var(--ocean));
  }

  .switch.on::after {
    transform: translateX(13px);
    border-color: rgba(255, 255, 255, 0.35);
  }

  .demo-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
  }

  .loading { text-align: center; padding: 2.4rem; color: var(--text-muted); font-size: 14px; }
  .spinner {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(64, 54, 34, 0.18);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    margin: 0 auto 11px;
  }

  @keyframes spin { to { transform: rotate(360deg); } }

  .error {
    background: #fff0ef;
    border: 1px solid #f4b8b4;
    border-radius: 12px;
    padding: 11px 13px;
    font-size: 14px;
    color: #8b2828;
    margin-top: 1rem;
  }

  .notice {
    margin-top: 0.7rem;
    font-size: 12px;
    color: var(--text-faint);
  }

  .home-intro {
    max-width: 760px;
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 1rem;
  }

  .home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 0.95rem; }
  .home-tool-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.4rem;
    cursor: pointer;
    transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
    display: block;
  }

  .home-tool-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
  }

  .tool-icon {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
    margin-bottom: 11px;
  }

  .icon-pitch { background: var(--sun-soft); }
  .icon-match { background: var(--ocean-soft); }

  .tool-name { font-size: 17px; font-weight: 700; margin-bottom: 5px; }
  .tool-desc { font-size: 13px; color: var(--text-muted); line-height: 1.6; }
  .tool-arrow { font-size: 18px; margin-top: 11px; color: var(--text-faint); }

  .split {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 14px;
    margin-top: 0.8rem;
  }

  .timeline-item {
    display: flex;
    gap: 10px;
    padding: 0.55rem 0;
    border-bottom: 1px dashed var(--border);
  }

  .timeline-item:last-child { border-bottom: none; }
  .tl-time {
    min-width: 80px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-top: 3px;
  }

  .tl-title { font-size: 14px; font-weight: 700; }
  .tl-tip { font-size: 13px; color: var(--text-muted); }

  .criteria-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 7px;
    font-size: 13px;
  }

  .criteria-badge {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 2px 9px;
    font-size: 11px;
    color: var(--text-muted);
  }

  .score-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 9px;
    margin-bottom: 0.95rem;
  }

  .score-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    text-align: center;
    padding: 11px 9px;
    background: rgba(255, 250, 240, 0.8);
  }

  .score-num { font-family: 'Fraunces', serif; font-size: 27px; line-height: 1.1; }
  .score-lbl { font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-faint); margin-top: 3px; }

  .meter-wrap { margin-top: 0.3rem; display: flex; flex-direction: column; gap: 7px; }
  .meter {
    width: 100%;
    height: 9px;
    border-radius: 999px;
    background: #e8decb;
    overflow: hidden;
    border: 1px solid rgba(64, 54, 34, 0.15);
  }

  .meter > span {
    display: block;
    height: 100%;
    background: linear-gradient(140deg, #2b7054, #2f6b8c);
  }

  .fb-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem 1.05rem;
    margin-bottom: 0.75rem;
    background: rgba(255, 252, 247, 0.88);
  }

  .fb-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
  }

  .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
  .dot-green { background: #4d8d38; }
  .dot-amber { background: #b47820; }
  .dot-blue { background: #2c6e84; }

  .fb-list { list-style: none; display: flex; flex-direction: column; gap: 7px; }
  .fb-list li {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    padding-left: 12px;
    position: relative;
  }

  .fb-list li::before { content: '•'; position: absolute; left: 0; color: var(--text-faint); }

  .slide-item {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(64, 54, 34, 0.12);
  }

  .slide-item:last-child { border-bottom: none; }

  .slide-num {
    width: 27px;
    height: 27px;
    border-radius: 9px;
    background: #e9e0ce;
    color: #5d5140;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .slide-name { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
  .slide-tip { font-size: 13px; color: var(--text-muted); line-height: 1.55; }

  .result-top {
    margin-top: 1.2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .mini-highlight {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px;
    background: rgba(255, 250, 240, 0.8);
  }

  .mini-label {
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 5px;
    font-weight: 700;
  }

  .mini-copy { font-size: 13px; color: var(--text-muted); line-height: 1.55; }

  .mentor-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.1rem;
    margin-bottom: 0.8rem;
  }

  .mentor-card.top {
    border-color: rgba(36, 71, 55, 0.55);
    box-shadow: 0 12px 20px rgba(24, 61, 44, 0.14);
  }

  .best-badge {
    display: inline-block;
    background: #dcece2;
    color: #2c624b;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
  }

  .mentor-header { display: flex; gap: 11px; align-items: flex-start; }

  .avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Fraunces', serif;
    font-size: 16px;
    flex-shrink: 0;
  }

  .av-a { background: #e8f0dc; color: #2f6b2f; }
  .av-b { background: #e3f0f6; color: #2a5a7a; }
  .av-c { background: #f9e8d7; color: #9b5c16; }

  .mentor-info { flex: 1; }
  .mentor-name { font-size: 15px; font-weight: 700; }
  .mentor-role { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
  .expertise-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }

  .exp-tag {
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 11px;
    padding: 3px 8px;
    color: var(--text-muted);
    background: rgba(255, 250, 240, 0.7);
  }

  .match-score { text-align: right; min-width: 72px; }
  .match-pct { font-family: 'Fraunces', serif; font-size: 27px; line-height: 1; }
  .match-lbl { font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-faint); }

  .divider { border: 0; border-top: 1px solid rgba(64, 54, 34, 0.14); margin: 10px 0; }
  .match-why { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }

  .qs-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-faint);
    font-weight: 700;
    margin-bottom: 7px;
  }

  .q-list { list-style: none; display: flex; flex-direction: column; gap: 7px; }

  .q-list li {
    font-size: 13px;
    line-height: 1.5;
    padding-left: 15px;
    position: relative;
  }

  .q-list li::before {
    content: '?';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--text-faint);
  }

  .match-plan {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0.95rem;
    background: rgba(255, 252, 247, 0.86);
    margin-bottom: 0.8rem;
  }

  .plan-list { list-style: none; display: flex; flex-direction: column; gap: 7px; }
  .plan-list li {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    padding-left: 13px;
    position: relative;
  }

  .plan-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--text-faint);
  }

  @media (max-width: 900px) {
    .split { grid-template-columns: 1fr; }
  }

  @media (max-width: 760px) {
    nav {
      flex-wrap: wrap;
      justify-content: center;
      gap: 0.2rem;
      padding-bottom: 0.55rem;
    }

    .nav-brand { width: 100%; justify-content: center; min-width: 0; }
    .nav-tabs { margin-left: 0; width: 100%; justify-content: center; }
    .nav-tab { flex: 1; justify-content: center; }
    .demo-toggle { margin: 0.4rem auto 0; }
    .home-grid, .grid2, .grid3, .result-top, .score-grid { grid-template-columns: 1fr; }
    .tl-time { min-width: 70px; }
  }
