/* Ferry Fire Evacuation Planner — Styles */
:root {
  --navy: #1B2A4A;
  --safety-orange: #F4A261;
  --alert-red: #E76F51;
  --white: #FFFFFF;
  --off-white: #F8F6F3;
  --light-gray: #E8E5DF;
  --text-primary: #1B2A4A;
  --text-secondary: #4A5568;
  --text-muted: #718096;
  --border: #D6D3CC;
  --shadow-sm: 0 2px 8px rgba(27,42,74,0.08);
  --shadow-md: 0 4px 16px rgba(27,42,74,0.12);
  --radius: 8px;
  --radius-lg: 12px;
  --font-stack: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{font-size:17px;scroll-behavior:smooth}
body{font-family:var(--font-stack);background:var(--off-white);color:var(--text-primary);line-height:1.6;min-height:100vh;display:flex;flex-direction:column}

/* Header */
.site-header{background:var(--navy);color:var(--white);padding:0.75rem 1.25rem;position:sticky;top:0;z-index:100;box-shadow:var(--shadow-sm)}
.header-inner{max-width:1100px;margin:0 auto;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:0.75rem}
.logo{display:flex;align-items:center;gap:0.5rem;text-decoration:none;color:var(--white)}
.logo-text{font-weight:700;font-size:1.15rem;letter-spacing:-0.01em}
.nav-list{display:flex;list-style:none;gap:1.5rem;flex-wrap:wrap}
.nav-list a{color:var(--off-white);text-decoration:none;font-weight:500;font-size:0.95rem;transition:color 0.2s}
.nav-list a:hover,.nav-list a:focus-visible{color:var(--safety-orange)}

/* Main layout */
main{flex:1;max-width:1100px;margin:0 auto;padding:1.5rem 1.25rem 3rem;width:100%}

/* Hero */
.hero-card{background:var(--white);border-radius:var(--radius-lg);padding:2rem 2rem 1.5rem;box-shadow:var(--shadow-md);display:flex;flex-wrap:wrap;gap:1.5rem;align-items:center;margin-bottom:2rem}
.hero-content{flex:1;min-width:260px}
.hero-content h1{font-size:2rem;font-weight:700;color:var(--navy);line-height:1.2;margin-bottom:0.75rem}
.hero-sub{color:var(--text-secondary);font-size:1.05rem;max-width:600px}
.hero-visual{flex-shrink:0;display:flex;align-items:center;justify-content:center}

/* Section titles */
.section-title{font-size:1.4rem;font-weight:700;color:var(--navy);margin-bottom:1.25rem;border-bottom:3px solid var(--safety-orange);display:inline-block;padding-bottom:0.35rem}

/* Planner grid */
.planner-section{margin-bottom:2.5rem}
.planner-grid{display:grid;grid-template-columns:1fr 1fr;gap:1.5rem;background:var(--white);border-radius:var(--radius-lg);padding:2rem;box-shadow:var(--shadow-md)}
.planner-form{display:flex;flex-direction:column;gap:1.25rem}
.form-group{display:flex;flex-direction:column;gap:0.35rem}
.form-group label{font-weight:600;font-size:0.95rem;color:var(--text-primary)}
.form-group select{width:100%;padding:0.6rem 0.75rem;border:2px solid var(--border);border-radius:var(--radius);font-size:0.95rem;background:var(--off-white);color:var(--text-primary);appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234A5568' stroke-width='2' fill='none'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 0.75rem center;padding-right:2.25rem}
.form-group select:focus-visible{outline:3px solid var(--safety-orange);outline-offset:2px;border-color:var(--safety-orange)}
.form-actions{display:flex;gap:0.75rem;flex-wrap:wrap}
.btn-primary{padding:0.7rem 1.5rem;background:var(--navy);color:var(--white);border:none;border-radius:var(--radius);font-weight:600;font-size:0.95rem;cursor:pointer;transition:background 0.2s,transform 0.1s}
.btn-primary:hover,.btn-primary:focus-visible{background:#2A3E62;transform:translateY(-1px)}
.btn-primary:active{transform:translateY(0)}
.btn-secondary{padding:0.7rem 1.5rem;background:var(--white);color:var(--navy);border:2px solid var(--navy);border-radius:var(--radius);font-weight:600;font-size:0.95rem;cursor:pointer;transition:background 0.2s}
.btn-secondary:hover,.btn-secondary:focus-visible{background:var(--off-white)}
.preset-buttons{display:flex;flex-wrap:wrap;align-items:center;gap:0.5rem;margin-top:0.25rem}
.preset-label{font-size:0.85rem;color:var(--text-muted);font-weight:500}
.btn-preset{padding:0.4rem 0.9rem;background:var(--light-gray);color:var(--text-primary);border:1px solid var(--border);border-radius:var(--radius);font-size:0.85rem;cursor:pointer;transition:background 0.2s}
.btn-preset:hover,.btn-preset:focus-visible{background:var(--safety-orange);color:var(--navy);border-color:var(--safety-orange)}

/* Result panel */
.result-panel{border-left:4px solid var(--safety-orange);padding:1.5rem;border-radius:0 var(--radius-lg) var(--radius-lg) 0;display:flex;flex-direction:column;gap:1rem;min-height:280px}
.result-panel.empty-state{background:var(--off-white);justify-content:center;align-items:center;text-align:center}
.empty-message{color:var(--text-muted);max-width:220px}
.empty-message svg{margin-bottom:0.75rem}
.result-panel.active{background:var(--white)}
.result-header{display:flex;align-items:center;gap:0.75rem}
.result-header h3{font-size:1.15rem;color:var(--navy)}
.result-badge{background:var(--alert-red);color:var(--white);padding:0.25rem 0.6rem;border-radius:1rem;font-size:0.8rem;font-weight:700}
.result-diagram{background:var(--off-white);border-radius:var(--radius);padding:1rem;text-align:center;font-family:monospace;font-size:0.9rem;line-height:1.5;color:var(--navy)}
.result-diagram pre{margin:0;white-space:pre-wrap}
.result-details{font-size:0.95rem;color:var(--text-secondary)}
.result-details ul{margin:0.5rem 0 0 1.25rem}
.result-details li{margin-bottom:0.35rem}
.result-actions{display:flex;gap:0.75rem;flex-wrap:wrap;margin-top:0.5rem}
.btn-print,.btn-save{padding:0.5rem 1rem;border-radius:var(--radius);font-size:0.85rem;font-weight:600;cursor:pointer;border:2px solid var(--navy);background:var(--white);color:var(--navy);transition:background 0.2s}
.btn-print:hover,.btn-save:hover{background:var(--off-white)}

/* Scenario section */
.scenario-section{margin-bottom:2.5rem}
.scenario-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:1.25rem}
.scenario-card{background:var(--white);border-radius:var(--radius-lg);padding:1.5rem;box-shadow:var(--shadow-sm)}
.scenario-card h3{font-size:1.05rem;color:var(--navy);margin-bottom:0.5rem}
.scenario-card p{font-size:0.95rem;color:var(--text-secondary);line-height:1.55}

/* Reference section */
.reference-section{margin-bottom:2.5rem}
.ref-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:1.25rem}
.ref-card{background:var(--white);border-radius:var(--radius-lg);padding:1.5rem;box-shadow:var(--shadow-sm)}
.ref-card h3{font-size:1.05rem;color:var(--navy);margin-bottom:0.5rem}
.ref-card p,.ref-card ul{font-size:0.95rem;color:var(--text-secondary);line-height:1.55}
.ref-card ul{margin:0.5rem 0 0 1.25rem}
.ref-card li{margin-bottom:0.35rem}
.ref-note{font-size:0.85rem;color:var(--text-muted);margin-top:0.75rem;font-style:italic}

/* About block */
.about-block{background:var(--white);border-radius:var(--radius-lg);padding:2rem;box-shadow:var(--shadow-sm);margin-bottom:1rem}
.about-block h2{font-size:1.3rem;color:var(--navy);margin-bottom:0.75rem}
.about-block p{font-size:0.95rem;color:var(--text-secondary);line-height:1.6;margin-bottom:0.75rem}
.about-meta{font-size:0.85rem;color:var(--text-muted);margin-top:1rem}

/* Footer */
.site-footer{background:var(--navy);color:var(--off-white);padding:1.25rem 1.25rem;margin-top:auto}
.footer-inner{max-width:1100px;margin:0 auto;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:0.75rem}
.footer-text,.footer-nav a{font-size:0.85rem}
.footer-text a{color:var(--safety-orange);text-decoration:none}
.footer-text a:hover{text-decoration:underline}
.footer-nav{display:flex;gap:1.25rem}
.footer-nav a{color:var(--off-white);text-decoration:none;transition:color 0.2s}
.footer-nav a:hover{color:var(--safety-orange)}

/* Responsive */
@media(max-width:768px){
  .planner-grid{grid-template-columns:1fr;padding:1.5rem}
  .result-panel{border-left:none;border-top:4px solid var(--safety-orange);border-radius:var(--radius-lg);min-height:auto}
  .hero-card{flex-direction:column;text-align:center}
  .hero-content h1{font-size:1.6rem}
}
@media(max-width:480px){
  html{font-size:16px}
  .header-inner,.footer-inner{flex-direction:column;text-align:center}
  .nav-list{gap:1rem;justify-content:center}
  .scenario-grid,.ref-grid{grid-template-columns:1fr}
}



/* 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;
}
