/* ===== CSS Reset & Base ===== */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{font-size:16px;scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;line-height:1.6;color:#1e293b;background:#f8fafc;min-height:100vh}
img,svg{max-width:100%;height:auto}
button,input,select{font-family:inherit;font-size:inherit}
ul,ol{list-style:none}
a{color:inherit;text-decoration:none}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* ===== Design Tokens ===== */
:root{
  --navy:#1B3A5C;
  --navy-dark:#122840;
  --navy-light:#2A5080;
  --sky:#7EC8E3;
  --sky-light:#E0F2FB;
  --teal:#2BAE8F;
  --teal-dark:#1F8A70;
  --amber:#F5A623;
  --red:#D94F4F;
  --green:#2BAE6E;
  --gray-50:#f8fafc;
  --gray-100:#f1f5f9;
  --gray-200:#e2e8f0;
  --gray-300:#cbd5e1;
  --gray-400:#94a3b8;
  --gray-500:#64748b;
  --gray-600:#475569;
  --gray-700:#334155;
  --gray-800:#1e293b;
  --radius:8px;
  --radius-lg:12px;
  --shadow:0 1px 3px rgba(0,0,0,.08),0 1px 2px rgba(0,0,0,.06);
  --shadow-md:0 4px 6px -1px rgba(0,0,0,.08),0 2px 4px -2px rgba(0,0,0,.06);
  --shadow-lg:0 10px 15px -3px rgba(0,0,0,.08),0 4px 6px -4px rgba(0,0,0,.04);
  --max-width:1120px;
  --header-height:64px;
}

/* ===== Container ===== */
.container{width:100%;max-width:var(--max-width);margin:0 auto;padding:0 20px}

/* ===== Header ===== */
.site-header{background:var(--navy);color:#fff;position:sticky;top:0;z-index:100;height:var(--header-height);display:flex;align-items:center}
.site-header .container{display:flex;align-items:center;justify-content:space-between;gap:16px}
.logo{display:flex;align-items:center;gap:10px;font-size:1.25rem;font-weight:700;flex-shrink:0}
.logo-text .accent{color:var(--sky)}
.main-nav{display:flex;gap:4px;overflow-x:auto}
.main-nav a{padding:8px 14px;border-radius:var(--radius);font-size:.875rem;font-weight:500;opacity:.85;transition:opacity .15s,background .15s;white-space:nowrap}
.main-nav a:hover,.main-nav a:focus{opacity:1;background:rgba(255,255,255,.12)}

/* ===== Buttons ===== */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:10px 20px;border-radius:var(--radius);font-size:.9375rem;font-weight:600;border:2px solid transparent;cursor:pointer;transition:all .15s;line-height:1.4}
.btn-primary{background:var(--teal);color:#fff;border-color:var(--teal)}
.btn-primary:hover,.btn-primary:focus{background:var(--teal-dark);border-color:var(--teal-dark)}
.btn-ghost{background:transparent;color:var(--navy);border-color:var(--gray-300)}
.btn-ghost:hover,.btn-ghost:focus{border-color:var(--navy);background:var(--gray-50)}
.btn-danger{background:transparent;color:var(--red);border-color:var(--red)}
.btn-danger:hover,.btn-danger:focus{background:rgba(217,79,79,.08)}
.btn-sm{padding:7px 14px;font-size:.8125rem}
.btn:disabled{opacity:.45;cursor:not-allowed}

/* ===== Hero ===== */
.hero{background:linear-gradient(160deg,var(--navy) 0%,var(--navy-light) 60%,#1a4a6a 100%);color:#fff;padding:64px 0 72px}
.hero h1{font-size:clamp(1.75rem,4vw,2.75rem);line-height:1.2;font-weight:800;margin-bottom:16px}
.hero-sub{font-size:1.125rem;opacity:.85;max-width:560px;margin-bottom:28px;line-height:1.5}
.hero-actions{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:20px}
.hero-actions .btn-ghost{color:#fff;border-color:rgba(255,255,255,.35)}
.hero-actions .btn-ghost:hover,.hero-actions .btn-ghost:focus{border-color:#fff;background:rgba(255,255,255,.1)}
.hero-note{font-size:.8125rem;opacity:.6;max-width:480px}

/* ===== Section Basics ===== */
section{padding:56px 0}
section h2{font-size:clamp(1.375rem,3vw,1.75rem);font-weight:700;color:var(--navy);margin-bottom:12px}
.section-intro{color:var(--gray-500);max-width:640px;margin-bottom:32px;font-size:1rem}

/* ===== How Section ===== */
.how-section{background:#fff}
.how-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:24px}
.how-card{border:1px solid var(--gray-200);border-radius:var(--radius-lg);padding:24px;background:var(--gray-50)}
.how-num{width:36px;height:36px;border-radius:50%;background:var(--navy);color:#fff;font-weight:700;font-size:.875rem;display:flex;align-items:center;justify-content:center;margin-bottom:14px}
.how-card h3{font-size:1rem;font-weight:600;margin-bottom:8px;color:var(--gray-800)}
.how-card p{font-size:.875rem;color:var(--gray-500);line-height:1.5}

/* ===== Planner Section ===== */
.planner-section{background:var(--gray-100);padding:64px 0}
.planner-layout{display:grid;grid-template-columns:1fr 300px;gap:32px;align-items:start}
.planner-main{background:#fff;border-radius:var(--radius-lg);padding:32px;box-shadow:var(--shadow-md)}
.planner-main h2{margin-bottom:4px}
.planner-intro{color:var(--gray-500);font-size:.9375rem;margin-bottom:24px}

/* Form */
.form-block{margin-bottom:28px}
.form-block h3{font-size:1rem;font-weight:600;color:var(--gray-700);margin-bottom:14px}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:16px}
.form-group{display:flex;flex-direction:column;gap:6px}
.form-group label{font-size:.8125rem;font-weight:600;color:var(--gray-600)}
.form-group input,.form-group select{padding:10px 14px;border:1px solid var(--gray-300);border-radius:var(--radius);background:#fff;font-size:.9375rem;color:var(--gray-800);transition:border-color .15s}
.form-group input:focus,.form-group select:focus{outline:none;border-color:var(--navy);box-shadow:0 0 0 3px rgba(27,58,92,.12)}
.form-group-flex{flex:1}

/* Course Input */
.course-input-row{display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap;margin-bottom:14px}
.course-input-row .form-group{margin-bottom:0}
.course-input-row .form-group:first-child{flex:1;min-width:180px}
.course-input-row .form-group:nth-child(2){min-width:200px}

/* Preset Bar */
.preset-bar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:14px;background:var(--sky-light);border-radius:var(--radius);margin-bottom:20px}
.preset-label{font-size:.75rem;font-weight:600;color:var(--navy);text-transform:uppercase;letter-spacing:.04em}
.preset-btn{padding:5px 12px;border-radius:20px;border:1px solid var(--navy);background:#fff;color:var(--navy);font-size:.75rem;font-weight:600;cursor:pointer;transition:all .15s}
.preset-btn:hover,.preset-btn:focus{background:var(--navy);color:#fff}

/* Course Table */
.course-list-area{margin-bottom:24px}
.empty-state{text-align:center;padding:48px 20px;color:var(--gray-400);border:2px dashed var(--gray-200);border-radius:var(--radius-lg)}
.empty-state svg{margin-bottom:12px}
.course-table{width:100%;border-collapse:collapse;font-size:.875rem}
.course-table th{text-align:left;padding:10px 14px;background:var(--gray-100);font-weight:600;color:var(--gray-600);font-size:.75rem;text-transform:uppercase;letter-spacing:.04em;border-bottom:2px solid var(--gray-200)}
.course-table td{padding:12px 14px;border-bottom:1px solid var(--gray-100);vertical-align:middle}
.course-table tr:last-child td{border-bottom:none}
.course-table tr:hover td{background:var(--gray-50)}
.col-action{width:40px;text-align:center}
.btn-remove{background:none;border:none;color:var(--gray-400);cursor:pointer;font-size:1.125rem;padding:4px;border-radius:4px;transition:color .15s}
.btn-remove:hover,.btn-remove:focus{color:var(--red)}

/* Badges */
.badge{display:inline-block;padding:3px 10px;border-radius:20px;font-size:.75rem;font-weight:700;text-transform:uppercase;letter-spacing:.03em}
.badge-likely{background:#dcfce7;color:#166534}
.badge-partial{background:#fef3c7;color:#92400e}
.badge-unlikely{background:#fee2e2;color:#991b1b}

/* Summary */
.summary-area{background:var(--gray-50);border:1px solid var(--gray-200);border-radius:var(--radius-lg);padding:24px;margin-bottom:24px}
.summary-area h3{font-size:1rem;font-weight:600;margin-bottom:16px;color:var(--gray-700)}
.summary-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.summary-stat{text-align:center}
.stat-num{display:block;font-size:1.75rem;font-weight:800;color:var(--navy);line-height:1}
.stat-label{font-size:.75rem;color:var(--gray-500);margin-top:4px;display:block}
.stat-likely .stat-num{color:var(--green)}
.stat-partial .stat-num{color:var(--amber)}
.stat-unlikely .stat-num{color:var(--red)}

/* Export Bar */
.export-bar{display:flex;gap:10px;flex-wrap:wrap}

/* Sidebar */
.planner-sidebar{display:flex;flex-direction:column;gap:20px;position:sticky;top:calc(var(--header-height) + 24px)}
.sidebar-card{background:#fff;border:1px solid var(--gray-200);border-radius:var(--radius-lg);padding:20px;box-shadow:var(--shadow)}
.sidebar-card h3{font-size:.9375rem;font-weight:600;color:var(--navy);margin-bottom:12px}
.sidebar-card p,.sidebar-card li{font-size:.8125rem;color:var(--gray-500);line-height:1.5}
.legend-list{display:flex;flex-direction:column;gap:10px}
.legend-list li{display:flex;align-items:flex-start;gap:8px}
.dot{width:12px;height:12px;border-radius:50%;flex-shrink:0;margin-top:3px}
.dot-likely{background:var(--green)}
.dot-partial{background:var(--amber)}
.dot-unlikely{background:var(--red)}
.tip-list{display:flex;flex-direction:column;gap:8px}
.tip-list li{padding-left:14px;position:relative}
.tip-list li::before{content:"•";position:absolute;left:0;color:var(--sky);font-weight:700}

/* ===== Scenarios ===== */
.scenarios-section{background:#fff}
.scenario-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:24px}
.scenario-card{border:1px solid var(--gray-200);border-radius:var(--radius-lg);padding:28px;background:var(--gray-50);display:flex;flex-direction:column;gap:12px}
.scenario-tag{display:inline-block;background:var(--navy);color:#fff;font-size:.6875rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;padding:4px 10px;border-radius:4px;align-self:flex-start}
.scenario-card h3{font-size:1.0625rem;font-weight:600;color:var(--gray-800)}
.scenario-card p{font-size:.875rem;color:var(--gray-500);line-height:1.6}
.scenario-result{background:var(--sky-light);padding:12px 16px;border-radius:var(--radius);font-size:.875rem;color:var(--navy);font-weight:500}
.scenario-lessson{background:#fff3cd;padding:12px 16px;border-radius:var(--radius);font-size:.875rem;color:#856404;font-weight:500}
.scenario-lesson{background:#fff3cd;padding:12px 16px;border-radius:var(--radius);font-size:.875rem;color:#856404;font-weight:500}

/* ===== Categories Table ===== */
.categories-section{background:var(--gray-100)}
.table-wrap{overflow-x:auto;background:#fff;border-radius:var(--radius-lg);box-shadow:var(--shadow-md)}
.data-table{width:100%;border-collapse:collapse;font-size:.875rem}
.data-table th{text-align:left;padding:14px 18px;background:var(--navy);color:#fff;font-size:.75rem;text-transform:uppercase;letter-spacing:.04em;font-weight:600}
.data-table th:first-child{border-radius:var(--radius-lg) 0 0 0}
.data-table th:last-child{border-radius:0 var(--radius-lg) 0 0}
.data-table td{padding:14px 18px;border-bottom:1px solid var(--gray-100);color:var(--gray-600);line-height:1.5}
.data-table tr:last-child td{border-bottom:none}
.data-table tr:hover td{background:var(--gray-50)}

/* ===== Advisor Section ===== */
.advisor-section{background:#fff}
.checklist{display:flex;flex-direction:column;gap:20px}
.checklist li{display:grid;grid-template-columns:1fr;gap:6px;padding:20px;background:var(--gray-50);border:1px solid var(--gray-200);border-radius:var(--radius-lg);counter-increment:checklist-counter}
.checklist li strong{font-size:.9375rem;color:var(--navy);font-weight:600}
.checklist li span{font-size:.875rem;color:var(--gray-500);line-height:1.5}

/* ===== FAQ ===== */
.faq-section{background:var(--gray-100)}
.faq-list{display:flex;flex-direction:column;gap:16px}
.faq-item{background:#fff;border:1px solid var(--gray-200);border-radius:var(--radius-lg);padding:24px}
.faq-item dt{font-size:.9375rem;font-weight:600;color:var(--navy);margin-bottom:8px}
.faq-item dd{font-size:.875rem;color:var(--gray-500);line-height:1.6}

/* ===== Footer ===== */
.site-footer{background:var(--navy-dark);color:rgba(255,255,255,.7);padding:48px 0 24px;font-size:.8125rem}
.footer-top{display:grid;grid-template-columns:1fr auto;gap:32px;margin-bottom:32px;align-items:start}
.footer-brand p{margin-top:8px;max-width:320px;line-height:1.6;opacity:.7}
.footer-links{display:flex;flex-wrap:wrap;gap:16px}
.footer-links a{opacity:.7;transition:opacity .15s}
.footer-links a:hover,.footer-links a:focus{opacity:1}
.footer-bottom{display:flex;justify-content:space-between;flex-wrap:wrap;gap:12px;padding-top:20px;border-top:1px solid rgba(255,255,255,.12);opacity:.6}
.footer-bottom a{text-decoration:underline}

/* ===== Toast ===== */
.toast{position:fixed;bottom:24px;right:24px;background:var(--navy);color:#fff;padding:14px 20px;border-radius:var(--radius);font-size:.875rem;font-weight:500;box-shadow:var(--shadow-lg);z-index:200;opacity:0;transform:translateY(10px);transition:all .25s;pointer-events:none}
.toast.show{opacity:1;transform:translateY(0)}

/* ===== Print ===== */
@media print{
  .site-header,.site-footer,.hero,.how-section,.planner-sidebar,.preset-bar,.export-bar,.btn,.hero-actions,.hero-note,.ad-section,.toast{display:none!important}
  body{background:#fff;color:#000}
  .planner-section{padding:0}
  .planner-main{box-shadow:none;padding:0}
  .course-table th{background:#eee;color:#000}
  .summary-area{break-inside:avoid}
}

/* ===== Responsive ===== */
@media(max-width:900px){
  .planner-layout{grid-template-columns:1fr}
  .planner-sidebar{position:static;order:-1}
  .sidebar-card{display:none}
  .sidebar-card:first-child{display:block}
}
@media(max-width:700px){
  .form-row{grid-template-columns:1fr}
  .course-input-row{flex-direction:column;align-items:stretch}
  .course-input-row .form-group:nth-child(2){min-width:auto}
  .summary-grid{grid-template-columns:repeat(2,1fr)}
  .hero{padding:48px 0 56px}
  .main-nav{display:none}
  .footer-top{grid-template-columns:1fr}
  .footer-bottom{flex-direction:column}
  .scenario-grid{grid-template-columns:1fr}
}
@media(max-width:480px){
  .container{padding:0 14px}
  .planner-main{padding:20px}
  .preset-bar{flex-direction:column;align-items:flex-start}
  .export-bar{flex-direction:column}
  .export-bar .btn{width:100%}
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
