/* Sea Shells palette from Ghostty, with blended surfaces for the web. */
:root {
  --background: #09141b;
  --surface: #0e1e28;
  --surface-hover: #122936;
  --border: #233b48;
  --text: #deb88d;
  --heading: #fee4ce;
  --muted: #87acb4;
  --accent: #fca02f;
  --cyan: #68d4f1;
  --red: #d48678;
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  background: var(--background);
  color: var(--text);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button { color: inherit; }
input, select, textarea { min-width: 0; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }
::selection { background: #1e4962; color: var(--heading); }
h1, h2, p { margin: 0; }
h1, h2 { color: var(--heading); }
h1 { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 570; letter-spacing: -.045em; line-height: 1.15; overflow-wrap: anywhere; }
h2 { font-size: 1.1rem; font-weight: 550; }
.site-header { border-bottom: 1px solid var(--border); }
.header-inner, .container, .site-footer { width: min(1220px, calc(100% - 80px)); margin-inline: auto; }
.header-inner { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--heading); font-size: 1.15rem; font-weight: 600; letter-spacing: -.035em; }
.brand-period { color: var(--accent); }
.workspace-nav { display: flex; align-items: center; gap: 8px; }
.workspace-nav a { display: flex; align-items: center; gap: 8px; padding: 8px 13px; border-radius: 6px; font-size: .83rem; color: var(--muted); }
.workspace-nav a:hover, .workspace-nav a.active { background: var(--surface); color: var(--heading); }
.notice { padding: 14px 18px; margin-bottom: 28px; border: 1px solid #50a3b550; border-radius: 7px; background: #50a3b510; color: var(--cyan); font-size: .86rem; overflow-wrap: anywhere; }
.local-label { color: var(--muted); display: flex; align-items: center; gap: 8px; font-size: .78rem; letter-spacing: .025em; }
.local-dot { width: 6px; height: 6px; border-radius: 50%; background: #50a3b5; box-shadow: 0 0 0 4px #50a3b510; }
.container { flex: 1; padding-block: 56px 72px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 40px; }
.eyebrow { color: var(--accent); font-size: .68rem; font-weight: 600; letter-spacing: .18em; margin-bottom: 14px; }
.subtitle { color: var(--muted); margin-top: 12px; font-size: .95rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 42px; padding: 10px 18px; border: 1px solid transparent; border-radius: 7px; font-weight: 550; font-size: .85rem; white-space: nowrap; transition: background .15s, border-color .15s; }
.primary { background: var(--accent); color: var(--background); }
.primary:hover { background: #fdd39f; }
.secondary { background: var(--surface); border-color: var(--border); color: var(--heading); }
.secondary:hover { background: var(--surface-hover); border-color: var(--muted); }
.stage-tabs { display: flex; gap: 24px; overflow-x: auto; border-bottom: 1px solid var(--border); margin-bottom: 25px; }
.stage-tab { display: flex; align-items: center; gap: 9px; flex-shrink: 0; min-height: 44px; font-size: .83rem; color: var(--muted); padding: 0 0 15px; border-bottom: 2px solid transparent; }
.stage-tab span { font-size: .69rem; min-width: 20px; text-align: center; border-radius: 5px; padding: 1px 5px; background: var(--surface); color: var(--muted); }
.stage-tab:hover { color: var(--heading); }
.stage-tab.active { color: var(--heading); border-bottom-color: var(--accent); }
.stage-tab.active span { color: var(--accent); background: #fca02f15; }
.jobs-panel { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface); }
.toolbar { padding: 18px 20px; display: flex; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--border); }
.search-group { display: flex; align-items: center; gap: 10px; flex: 1; max-width: 520px; }
.search-icon { width: 18px; height: 18px; flex-shrink: 0; color: var(--muted); }
.search-group input { width: 100%; padding: 9px 0; background: transparent; border: 0; color: var(--heading); font-size: .86rem; border-radius: 3px; }
::placeholder { color: var(--muted); opacity: .8; }
.search-button { min-height: 34px; padding: 6px 11px; font-size: .77rem; background: var(--surface-hover); border-color: var(--border); }
.search-button:hover { border-color: var(--muted); }
.sort-group { display: flex; align-items: center; gap: 10px; font-size: .77rem; }
.sort-group label { color: var(--muted); white-space: nowrap; }
.sort-group select { background: var(--background); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 8px; max-width: 180px; }
.table-scroll { position: relative; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { color: var(--muted); font-size: .67rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; background: #09141b60; padding: 14px 20px; white-space: nowrap; }
td { padding: 23px 20px; border-top: 1px solid var(--border); font-size: .83rem; max-width: 250px; overflow-wrap: anywhere; }
tbody tr:hover { background: #17384c35; }
.role-cell { min-width: 210px; width: 30%; }
.job-link { display: inline-block; color: var(--heading); font-weight: 550; font-size: .95rem; }
.job-link:hover { color: var(--accent); }
.secondary-text { display: block; color: var(--muted); margin-top: 5px; font-size: .79rem; }
.salary-cell { min-width: 140px; }
.badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 5px; padding: 4px 8px; font-size: .72rem; font-weight: 500; white-space: nowrap; background: #87acb412; color: #87acb4; }
.badge::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.badge-applied { color: #68d4f1; background: #68d4f113; }
.badge-interviewing { color: #fca02f; background: #fca02f13; }
.badge-offer { color: #bbe3ee; background: #027c9b35; }
.badge-rejected { color: #d48678; background: #d4867813; }
.badge-withdrawn { color: #deb88d; background: #deb88d13; }
.date-cell { white-space: nowrap; font-variant-numeric: tabular-nums; font-size: .78rem; }
.overdue { color: var(--red); }
.row-open { display: flex; width: 28px; height: 28px; align-items: center; justify-content: center; color: var(--muted); border-radius: 5px; }
.row-open:hover { color: var(--accent); background: var(--surface-hover); }
.table-footer { padding: 13px 20px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; color: var(--muted); font-size: .73rem; }
.table-footer a:hover { color: var(--accent); }
.empty-state { text-align: center; padding: 68px 24px 76px; }
.empty-shell { margin-bottom: 28px; opacity: .85; }
.empty-state .eyebrow { font-size: .62rem; }
.empty-state h2 { font-size: 1.6rem; letter-spacing: -.03em; }
.empty-state > p:not(.eyebrow) { color: var(--muted); margin-top: 12px; font-size: .9rem; }
.empty-state .button { margin-top: 28px; }
.empty-mark { font-size: 2.8rem; color: var(--muted); display: block; margin-bottom: 12px; }
.site-footer { border-top: 1px solid var(--border); padding-block: 22px 28px; display: flex; justify-content: space-between; gap: 18px; color: var(--muted); font-size: .7rem; }
.narrow { max-width: 850px; margin-inline: auto; }
.back-link { display: inline-block; color: var(--muted); font-size: .82rem; margin-bottom: 32px; }
.back-link:hover { color: var(--accent); }
.form-heading { margin-bottom: 32px; }
.job-form { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface); }
.form-section { padding: 28px 32px 32px; border-bottom: 1px solid var(--border); }
.form-section h2 { font-size: .95rem; margin-bottom: 24px; }
.section-number { color: var(--muted); font-size: .67rem; font-variant-numeric: tabular-nums; margin-right: 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.three-columns { grid-template-columns: 1fr 1fr 1fr; }
.field { min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field label { display: block; color: var(--text); font-size: .8rem; margin-bottom: 8px; }
.required { color: var(--accent); }
.field input, .field select, .field textarea { width: 100%; padding: 11px 12px; background: var(--background); color: var(--heading); border: 1px solid var(--border); border-radius: 6px; font-size: .87rem; }
.field input, .field select { min-height: 44px; }
.field textarea { resize: vertical; line-height: 1.7; min-height: 100px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--cyan); }
.field [aria-invalid] { border-color: var(--red); }
.field-error { color: var(--red); font-size: .78rem; margin-top: 8px; }
.error-summary { border: 1px solid #d4867850; background: #d4867812; color: var(--red); border-radius: 6px; padding: 14px 18px; margin-bottom: 20px; font-size: .85rem; }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; padding: 22px 32px; }
.detail-heading { align-items: flex-start; }
.detail-heading h1 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.company-heading { overflow-wrap: anywhere; }
.heading-actions { display: flex; gap: 10px; flex-shrink: 0; }
.detail-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 26px; align-items: start; }
.detail-card { background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 28px; }
.detail-card h2 { font-size: .95rem; margin-bottom: 22px; }
.detail-content { display: grid; gap: 24px; }
.review-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.review-card { padding: 20px; min-width: 0; }
.review-card:has(.review-details[open]) { grid-column: 1 / -1; }
.review-identity { display: flex; align-items: flex-start; gap: 12px; }
.review-heading { flex: 1; min-width: 0; }
.company-avatar { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: 10px; overflow: hidden; background: #fff; color: #17384c; font-weight: 600; }
.company-avatar img { display: block; width: 40px; height: 40px; object-fit: contain; }
.fit-score { flex-shrink: 0; padding: 6px 9px; border: 1px solid #fca02f30; border-radius: 7px; background: #fca02f0a; color: var(--accent); text-align: center; font-variant-numeric: tabular-nums; }
.fit-score > span { display: block; font-size: .6rem; letter-spacing: .05em; }
.fit-score strong { display: block; font-size: 1.25rem; line-height: 1.3; font-weight: 550; }
.fit-score small { font-size: .63rem; font-weight: 400; margin-left: 2px; }
.fit-strong { color: var(--cyan); background: #68d4f10a; border-color: #68d4f130; }
.fit-explanation h3 { margin: 0 0 10px; color: var(--heading); font-size: .95rem; font-weight: 550; }
.fit-reason { max-width: 70ch; }
.fit-breakdown { max-width: 36rem; margin-block: 20px; }
.fit-breakdown > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: baseline; padding-block: 10px; border-bottom: 1px solid var(--border); }
.fit-breakdown > div + div { margin-top: 0; }
.fit-breakdown dt { margin: 0; font-size: .85rem; }
.fit-breakdown dd { font-size: .9rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fit-breakdown strong { color: var(--heading); font-weight: 600; }
.fit-breakdown dd span { color: var(--muted); }
.fit-meta { color: var(--muted); font-size: .73rem; line-height: 1.7; margin-top: 14px; }
.detail-company { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.detail-company .eyebrow { margin: 0; }
.job-row-identity { display: flex; align-items: flex-start; gap: 12px; }
.job-row-identity .company-avatar { width: 32px; height: 32px; border-radius: 7px; }
.job-row-identity img { width: 28px; height: 28px; }
.review-labels { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 9px; }
.review-card .eyebrow { margin: 0; }
.review-card h2 { margin: 0; }
.review-card .job-link { font-size: 1.12rem; overflow-wrap: anywhere; }
.review-card .review-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 22px; margin: 16px 0; }
.review-facts > div + div { margin-top: 0; }
.review-facts dt { margin-bottom: 4px; }
.review-facts dd { font-size: .8rem; }
.review-blurb { color: var(--muted); font-size: .84rem; line-height: 1.6; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin-bottom: 12px; }
.review-card:has(.review-details[open]) .review-blurb { display: none; }
.review-details summary { display: flex; align-items: center; gap: 8px; cursor: pointer; color: var(--cyan); font-size: .78rem; list-style: none; padding-block: 4px; }
.review-details summary::-webkit-details-marker { display: none; }
.review-details summary::before { content: "+"; font-size: 1rem; }
.review-details[open] summary::before { content: "−"; }
.review-details .when-expanded, .review-details[open] .when-collapsed { display: none; }
.review-details[open] .when-expanded { display: inline; }
.review-full-listing { border-top: 1px solid var(--border); margin-top: 14px; }
.review-full-listing section { margin-top: 24px; }
.review-full-listing h3 { font-size: .85rem; font-weight: 550; color: var(--heading); margin: 0 0 10px; }
.review-card-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.review-card-actions .button { min-height: 44px; padding: 7px 12px; font-size: .78rem; }
.review-links, .review-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.review-links .text-link { margin: 0; }
.trash-button { color: var(--red); }
.review-banner { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 28px; margin-bottom: 26px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.review-banner h2 { margin-bottom: 6px; }
dl { margin: 0; }
dl > div + div { margin-top: 23px; }
dt { font-size: .7rem; color: var(--muted); margin-bottom: 6px; }
dd { margin: 0; font-size: .87rem; overflow-wrap: anywhere; }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; font-size: .9rem; }
.muted { color: var(--muted); font-size: .88rem; }
.text-link { display: inline-block; margin-top: 18px; font-size: .8rem; color: var(--accent); }
.delete-link { color: var(--red); border: 0; background: transparent; padding: 12px 0; margin-top: 14px; font-size: .78rem; }
.delete-link:hover { text-decoration: underline; }
dialog { width: min(460px, calc(100% - 40px)); padding: 30px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); box-shadow: 0 20px 100px #0008; }
dialog::backdrop { background: #030a10bb; backdrop-filter: blur(3px); }
dialog h2 { font-size: 1.3rem; margin-bottom: 12px; }
dialog p { font-size: .9rem; color: var(--muted); overflow-wrap: anywhere; }
.dialog-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 28px; }
.danger { background: var(--red); color: var(--background); }
.danger:hover { background: #e7a99d; }
.error-page { padding-top: 80px; }
.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; }
.skip-link { position: fixed; top: -80px; left: 20px; background: var(--accent); color: var(--background); padding: 10px 20px; border-radius: 6px; z-index: 10; }
.skip-link:focus { top: 12px; }

.quiet-button { background: transparent; border: 0; color: var(--muted); padding: 10px; font-size: .8rem; }
.quiet-button:hover { color: var(--heading); }
.application-panel { border-block: 1px solid var(--border); padding-block: 24px; margin-bottom: 32px; display: grid; gap: 18px; }
.application-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.application-heading h2 { overflow-wrap: anywhere; }
.application-panel .text-link { margin-top: 0; }
.application-panel form > .text-link { margin-left: 14px; }
.run-needs_input { color: var(--accent); }
.run-failed { color: var(--red); }
.run-submitted, .run-completed { color: var(--cyan); }
.reply-form { display: grid; justify-items: start; gap: 16px; max-width: 720px; }
.reply-form .field { width: 100%; }
.check-label { display: flex; align-items: start; gap: 10px; font-size: .88rem; }
.check-label input { margin-top: 5px; }
.document-links { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.run-history { color: var(--muted); font-size: .85rem; }
.run-history summary { cursor: pointer; padding-block: 10px; }
.run-history ol { padding-left: 20px; }
.run-history li { padding: 10px 0; overflow-wrap: anywhere; }
.run-history time { font-size: .75rem; }
.run-history p { color: var(--text); margin-top: 4px; }
.run-history .prose { margin-top: 16px; }
.login-layout { max-width: 440px; margin: 30px auto; }
.profile-summary { margin-top: 24px; }
.activity-entry { padding-block: 24px; border-top: 1px solid var(--border); }
.activity-entry > p { margin-top: 12px; }
.activity-entry h2 a:hover { color: var(--accent); }
.browser-frame { display: block; width: 100%; height: 75vh; min-height: 400px; border: 1px solid var(--border); margin-top: 24px; }

@media (max-width: 950px) {
  .header-inner, .container, .site-footer { width: calc(100% - 48px); }
  .stage-tabs { gap: 20px; }
  th, td { padding-inline: 16px; }
  .detail-heading { flex-direction: column; }
  .detail-layout { grid-template-columns: 235px minmax(0, 1fr); gap: 20px; }
}

@media (max-width: 650px) {
  .header-inner, .container, .site-footer { width: calc(100% - 32px); }
  .header-inner { min-height: 72px; flex-wrap: wrap; gap: 14px; padding-block: 18px; }
  .workspace-nav { order: 3; width: 100%; }
  .workspace-nav a { padding-inline: 9px; }
  .application-heading { flex-wrap: wrap; gap: 10px; }
  .brand { font-size: 1rem; gap: 8px; }
  .local-label { font-size: .65rem; }
  .container { padding-block: 36px 48px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 22px; margin-bottom: 30px; }
  .eyebrow { font-size: .62rem; }
  .toolbar { flex-direction: column; gap: 14px; padding: 16px; }
  .search-group { max-width: none; width: 100%; }
  .sort-group { justify-content: space-between; }
  .sort-group select { max-width: none; }
  .empty-state { padding: 45px 20px 52px; }
  .empty-state h2 { font-size: 1.35rem; }
  .site-footer { flex-direction: column; gap: 6px; }
  .form-grid, .three-columns { grid-template-columns: 1fr; }
  .form-section { padding: 24px 20px; }
  .form-actions { padding: 20px; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-card { padding: 24px; }
  .detail-sidebar dl { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
  dl > div + div { margin-top: 0; }
  .heading-actions { flex-wrap: wrap; }
  .review-list { grid-template-columns: minmax(0, 1fr); }
  .review-card { padding: 18px; }
  .review-banner { flex-direction: column; align-items: flex-start; padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
