:root {
    --navy: #071f2a;
    --navy-2: #0c3442;
    --teal: #0e8991;
    --teal-dark: #08666e;
    --aqua: #88d3cd;
    --foam: #edf7f5;
    --ink: #122a33;
    --muted: #667a80;
    --line: #dce8e6;
    --white: #fff;
    --shadow: 0 24px 70px rgba(6, 36, 46, .12);
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: #f5faf9; font-family: "DM Sans", sans-serif; }
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, p { margin-top: 0; }
h1, h2, .brand { font-family: "Manrope", sans-serif; }

.brand { display: inline-flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.brand-light { color: white; }
.brand-mark { position: relative; display: inline-flex; width: 35px; height: 35px; align-items: center; justify-content: center; border: 1px solid rgba(13,137,145,.25); border-radius: 50%; overflow: hidden; }
.brand-light .brand-mark { border-color: rgba(255,255,255,.3); }
.brand-mark span { position: absolute; width: 24px; height: 7px; border-top: 2px solid var(--teal); border-radius: 50%; }
.brand-light .brand-mark span { border-color: var(--aqua); }
.brand-mark span:nth-child(1) { top: 10px; }
.brand-mark span:nth-child(2) { top: 16px; width: 20px; }
.brand-mark span:nth-child(3) { top: 22px; width: 15px; }

.welcome-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(420px, .85fr); }
.welcome-copy { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; padding: 48px 7vw 42px; color: white; overflow: hidden; background: radial-gradient(circle at 15% 15%, rgba(28,139,143,.5), transparent 36%), linear-gradient(145deg, var(--navy-2), var(--navy)); }
.welcome-copy::after { content: ""; position: absolute; width: 720px; height: 720px; right: -360px; bottom: -410px; border: 1px solid rgba(136,211,205,.17); border-radius: 50%; box-shadow: 0 0 0 85px rgba(136,211,205,.035), 0 0 0 170px rgba(136,211,205,.025); }
.welcome-message { position: relative; z-index: 1; max-width: 720px; padding: 90px 0 60px; }
.eyebrow { margin-bottom: 14px; color: var(--teal); font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.welcome-copy .eyebrow { color: var(--aqua); }
.welcome-message h1 { margin-bottom: 28px; font-size: clamp(48px, 5.3vw, 78px); line-height: 1.02; letter-spacing: -.055em; }
.lead { max-width: 590px; color: #c7d9dc; font-size: 18px; line-height: 1.7; }
.feature-row { display: flex; gap: 32px; margin-top: 48px; color: #d8e7e8; font-size: 13px; }
.feature-row span { display: flex; gap: 9px; align-items: center; }
.feature-row b { color: var(--aqua); font-size: 11px; }
.welcome-footnote { position: relative; z-index: 1; margin: 0; color: #88a5aa; font-size: 12px; }

.login-panel { display: grid; place-items: center; padding: 50px; background: #f7fbfa; }
.login-card { width: min(100%, 430px); padding: 52px; background: white; border: 1px solid #e4eceb; border-radius: 18px; box-shadow: var(--shadow); }
.login-card h2 { margin-bottom: 14px; font-size: 32px; letter-spacing: -.04em; }
.muted { color: var(--muted); line-height: 1.65; }
.mobile-brand { display: none; }
.google-button { display: flex; width: 100%; align-items: center; justify-content: center; gap: 12px; margin-top: 34px; padding: 15px 18px; color: var(--ink); background: white; border: 1px solid #cad9d7; border-radius: 9px; font-weight: 600; cursor: pointer; transition: .2s ease; }
.google-button:hover { border-color: var(--teal); box-shadow: 0 8px 24px rgba(14,137,145,.12); transform: translateY(-1px); }
.privacy-note { margin: 28px 0 0; color: #87979b; font-size: 11px; line-height: 1.6; text-align: center; }

.topbar { display: flex; min-height: 76px; align-items: center; justify-content: space-between; padding: 0 max(28px, 5vw); background: white; border-bottom: 1px solid var(--line); }
.user-menu { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.user-avatar { display: grid; width: 34px; height: 34px; place-items: center; color: white; background: var(--teal); border-radius: 50%; font-weight: 700; }
.user-name { font-weight: 600; }
.text-button { padding: 6px 0 6px 12px; color: var(--muted); background: none; border: 0; border-left: 1px solid var(--line); cursor: pointer; }
.workspace-shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 68px 0 80px; }
.workspace-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 36px; }
.workspace-heading h1 { margin-bottom: 10px; font-size: clamp(34px, 4vw, 50px); letter-spacing: -.05em; }
.workspace-heading .muted { max-width: 660px; margin-bottom: 0; }
.status-pill { flex: none; padding: 9px 13px; color: var(--teal-dark); background: #e7f5f2; border-radius: 999px; font-size: 12px; font-weight: 600; }
.status-pill span { display: inline-block; width: 7px; height: 7px; margin-right: 7px; background: #24a06b; border-radius: 50%; }
.notice { margin-bottom: 20px; padding: 13px 16px; color: #176349; background: #e8f7ef; border: 1px solid #c6ead7; border-radius: 8px; }
.isailor-guide { margin-bottom: 32px; padding: 30px; background: var(--navy); border-radius: 16px; box-shadow: var(--shadow); }
.guide-heading { display: flex; align-items: center; justify-content: space-between; gap: 28px; color: white; cursor: pointer; list-style: none; }
.guide-heading::-webkit-details-marker { display: none; }
.guide-heading::after { content: "View steps +"; flex: none; padding: 9px 13px; color: var(--aqua); border: 1px solid rgba(136,211,205,.4); border-radius: 999px; font-size: 12px; font-weight: 700; }
.isailor-guide[open] .guide-heading { margin-bottom: 24px; }
.isailor-guide[open] .guide-heading::after { content: "Hide steps −"; }
.guide-heading h2 { margin-bottom: 0; font-size: 27px; letter-spacing: -.035em; }
.guide-summary-copy { margin: 7px 0 0; color: #b9ced2; font-size: 13px; line-height: 1.5; }
.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.guide-card { position: relative; padding: 25px 24px 22px; background: white; border: 1px solid rgba(255,255,255,.12); border-radius: 11px; }
.guide-card-warning { border-color: #e2c16e; }
.guide-number { display: grid; width: 30px; height: 30px; place-items: center; margin-bottom: 15px; color: white; background: var(--teal); border-radius: 50%; font-family: "Manrope", sans-serif; font-size: 13px; font-weight: 800; }
.guide-card-warning .guide-number { color: #5e4610; background: #f1d589; }
.guide-card h3 { margin: 0 0 4px; font-family: "Manrope", sans-serif; font-size: 19px; }
.guide-app-label { margin-bottom: 16px; color: var(--teal); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.guide-card ol { margin: 0; padding-left: 21px; color: #405960; font-size: 13px; line-height: 1.55; }
.guide-card li { padding: 0 0 8px 4px; }
.guide-card li:last-child { padding-bottom: 0; }
.guide-caution { margin: 16px 0 0; padding: 11px 12px; color: #6a5019; background: #fff8e8; border-radius: 7px; font-size: 11px; line-height: 1.5; }
.workflow-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.workflow-card { position: relative; min-height: 440px; padding: 34px; background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 15px 45px rgba(21,62,72,.07); }
.step-number { position: absolute; top: 28px; right: 30px; color: #cbdad8; font-family: "Manrope", sans-serif; font-size: 14px; font-weight: 800; }
.card-copy h2 { margin-bottom: 8px; font-size: 27px; letter-spacing: -.035em; }
.upload-form { margin-top: 28px; }
.drop-zone { position: relative; display: flex; min-height: 165px; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); background: #f5faf9; border: 1.5px dashed #a9c8c4; border-radius: 10px; cursor: pointer; transition: .2s; }
.drop-zone:hover { color: var(--teal-dark); background: #eff8f6; border-color: var(--teal); }
.drop-zone.drag-active { color: var(--teal-dark); background: #e6f5f2; border-color: var(--teal); }
.drop-zone.uploading { cursor: wait; opacity: .75; pointer-events: none; }
.drop-zone strong { margin: 10px 0 4px; color: var(--ink); }
.upload-icon { display: grid; width: 38px; height: 38px; place-items: center; color: white; background: var(--teal); border-radius: 50%; font-size: 21px; }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.primary-button, .download-button { display: flex; width: 100%; min-height: 50px; align-items: center; justify-content: center; gap: 10px; margin-top: 18px; color: white; background: var(--teal); border: 0; border-radius: 8px; font-weight: 700; cursor: pointer; transition: .2s; }
.primary-button:hover, .download-button:hover { background: var(--teal-dark); transform: translateY(-1px); }
.form-error { margin-top: 10px; color: #a93838; font-size: 13px; }
.selected-file { display: flex; gap: 9px; align-items: center; margin: 36px 0 5px; font-weight: 700; word-break: break-word; }
.selected-file span { color: #24a06b; }
.download-button { margin-top: 70px; }
.download-actions { margin-top: 52px; }
.download-actions .download-button { margin-top: 10px; }
.download-button.secondary { color: var(--teal-dark); background: #e7f5f2; border: 1px solid #bfdfda; }
.download-button.secondary:hover { color: white; background: var(--teal-dark); }
.download-hint { color: #87979b; font-size: 12px; line-height: 1.5; text-align: center; }
.ipad-save-hint { margin-top: -5px; color: var(--teal-dark); }
.download-button[aria-busy="true"] { opacity: .7; pointer-events: none; }
.disabled { color: #91a4a7; background: #e7eeee; cursor: not-allowed; }
.disabled:hover { background: #e7eeee; transform: none; }
.card-disabled { opacity: .78; }
.recent-section { margin-top: 52px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.section-title h2 { font-size: 21px; }
.section-title span { color: var(--muted); font-size: 12px; }
.route-list { overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 12px; }
.route-row { display: grid; grid-template-columns: 38px 1fr auto; gap: 14px; align-items: center; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.route-row:last-child { border-bottom: 0; }
.route-row:hover, .route-row.active { background: #f0f8f6; }
.file-mark { display: grid; width: 34px; height: 34px; place-items: center; color: var(--teal-dark); background: #dff1ee; border-radius: 7px; font-size: 12px; font-weight: 800; }
.route-row strong, .route-row small { display: block; }
.route-row small { margin-top: 3px; color: var(--muted); }
.route-status { color: #26805f; font-size: 12px; font-weight: 600; }
.safety-disclaimer { display: flex; gap: 16px; align-items: flex-start; margin-top: 52px; padding: 22px 24px; color: #634e22; background: #fffaf0; border: 1px solid #ead9ae; border-radius: 12px; }
.safety-icon { display: grid; flex: 0 0 30px; width: 30px; height: 30px; place-items: center; color: #795e20; background: #f4dfaa; border-radius: 50%; font-family: "Manrope", sans-serif; font-weight: 800; }
.safety-disclaimer h2 { margin-bottom: 7px; color: #523e15; font-size: 15px; letter-spacing: -.01em; }
.safety-disclaimer p { margin: 0; font-size: 12px; line-height: 1.65; }
.legal-shell { width: min(860px, calc(100% - 40px)); min-height: calc(100vh - 76px); margin: 0 auto; padding: 48px 0 76px; }
.legal-document { margin-top: 40px; padding: 44px; background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 15px 45px rgba(21,62,72,.07); }
.legal-document h1 { margin-bottom: 8px; font-size: clamp(36px, 5vw, 54px); line-height: 1.04; letter-spacing: -.05em; }
.legal-document h2 { margin: 34px 0 10px; font-size: 20px; letter-spacing: -.025em; }
.legal-document p { color: #405960; line-height: 1.75; }
.legal-document a { color: var(--teal-dark); font-weight: 700; }
.legal-updated { color: var(--muted); font-size: 13px; }
.legal-document .safety-disclaimer { margin-top: 38px; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px max(28px, 5vw); color: #789095; background: white; border-top: 1px solid var(--line); font-size: 11px; }
.site-footer p { margin: 0; }
.site-footer a { color: #536b70; font-weight: 600; }
.site-footer span { margin: 0 8px; color: #adc0c4; }
.site-footer strong { color: #536b70; font-weight: 600; }

@media (max-width: 900px) {
    .welcome-shell { grid-template-columns: 1fr; }
    .welcome-copy { display: none; }
    .login-panel { min-height: 100vh; padding: 24px; }
    .mobile-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 62px; font-family: "Manrope", sans-serif; font-size: 20px; font-weight: 800; }
    .guide-grid { grid-template-columns: 1fr; }
    .workflow-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
    .login-card { padding: 34px 26px; }
    .topbar { padding: 0 18px; }
    .user-name { display: none; }
    .workspace-shell { width: min(100% - 28px, 1120px); padding-top: 42px; }
    .workspace-heading { align-items: flex-start; flex-direction: column; }
    .isailor-guide { padding: 24px 18px 18px; }
    .guide-heading { gap: 12px; }
    .guide-heading::after { content: "+"; padding: 7px 11px; font-size: 16px; }
    .isailor-guide[open] .guide-heading::after { content: "−"; }
    .guide-card { padding: 22px 19px 20px; }
    .workflow-card { min-height: auto; padding: 28px 22px; }
    .download-button { margin-top: 38px; }
    .section-title span { display: none; }
    .safety-disclaimer { padding: 19px; }
    .legal-shell { width: min(100% - 28px, 860px); padding-top: 28px; }
    .legal-document { margin-top: 28px; padding: 30px 22px; }
    .site-footer { align-items: flex-start; flex-direction: column; gap: 5px; padding: 20px 18px; }
}
