:root {
  color-scheme: light;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #18251e;
  background: #f6f7f3;
  font-synthesis: none;
  --muted: #56635a;
  --line: #e1e7df;
  --green: #285b3b;
  --dark-green: #1c462b;
  --tint: #edf4eb;
  --white: #fff;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 270px; }
h1, h2, h3, p, ul, dl, dd { margin: 0; }
[hidden], dialog:not([open]) { display: none !important; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: var(--green); }
:focus-visible { outline: 2px solid #35754b; outline-offset: 3px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.container { width: min(1184px, calc(100% - 80px)); margin-inline: auto; }

.topbar { height: 69px; background: #fafbf8; border-bottom: 1px solid #e3e8df; }
.topbar-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-actions .language-select { width: auto; max-width: 135px; flex: none; }
.topbar-actions .button { flex: none; white-space: nowrap; }
.check-label { display: flex; align-items: center; gap: 7px; line-height: 1.5; }
.check-label input { accent-color: var(--green); }
.import-toolbar { display: grid; gap: 9px; padding: 14px 20px 0; }
.bilingual-section { margin-top: 16px; }
.bilingual-table { border-collapse: separate; border-spacing: 0; width: 100%; table-layout: fixed; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; font-size: 14px; line-height: 1.6; }
.bilingual-table caption { text-align: left; font-size: 16px; font-weight: 700; padding-bottom: 10px; }
.bilingual-table th, .bilingual-table td { padding: 12px; vertical-align: top; text-align: left; border-bottom: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; }
.bilingual-table th { background: #f2f7f0; font-weight: 650; }
.bilingual-table th:first-child { width: 22%; }
.bilingual-table td:last-child { background: #fbfcf9; }
.bilingual-table tr:last-child td, .bilingual-table tbody tr:last-child th { border-bottom: 0; }
.brand { display: inline-flex; align-items: center; font-weight: 750; letter-spacing: -.055em; font-size: 24px; line-height: 1; }
.brand-mark { display: grid; place-items: center; width: 37px; height: 37px; margin-right: 11px; border-radius: 10px; background: var(--green); color: var(--white); }
.brand-mark .icon { width: 20px; height: 20px; }
.brand-period { color: #578467; }
.local-badge { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border: 1px solid #dce9d9; border-radius: 20px; color: #405d48; background: #edf4ea; font-size: 12px; font-weight: 650; white-space: nowrap; }
.local-badge .icon { width: 14px; height: 14px; }
.local-badge.temporary { color: #795221; border-color: #eddfcb; background: #fcf4e7; }

.intro { padding: 41px 0 32px; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: var(--green); font-size: 11px; font-weight: 750; letter-spacing: .14em; }
.eyebrow span { width: 7px; height: 7px; border-radius: 50%; background: #5c926b; }
.intro h1 { margin-top: 10px; font-size: clamp(33px, 4.5vw, 52px); letter-spacing: -.065em; line-height: 1.13; font-weight: 750; }
.intro > p:last-child { margin-top: 10px; color: var(--muted); font-size: 16px; line-height: 1.5; }

.workspace { display: grid; grid-template-columns: minmax(268px, 324px) minmax(0, 1fr); gap: 20px; align-items: stretch; }
.panel { min-width: 0; min-height: 554px; border: 1px solid var(--line); border-radius: 17px; background: var(--white); box-shadow: 0 3px 9px #213b2610; }
.library { display: flex; flex-direction: column; }
.library-top { padding: 20px; border-bottom: 1px solid var(--line); }
.section-heading, .preview-bar, .heading-label { display: flex; align-items: center; }
.section-heading, .preview-bar { justify-content: space-between; gap: 10px; }
.heading-label { gap: 9px; }
.heading-label > .icon { color: var(--green); }
.heading-label h2 { font-weight: 700; letter-spacing: -.025em; font-size: 17px; }
.count { display: grid; place-items: center; min-width: 26px; min-height: 25px; padding: 0 7px; border-radius: 7px; background: var(--tint); color: var(--green); font-size: 12px; font-weight: 750; }

.add-form { display: grid; gap: 8px; margin-top: 22px; }
.add-form label, #edit-form label, #ai-settings-form label, .ai-fields label { color: #35443a; font-size: 13px; font-weight: 650; }
.field { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 11px; border: 1px solid #dce4db; border-radius: 9px; color: #64776a; background: #fcfdfa; }
.field:focus-within { outline: 2px solid #4f835d; outline-offset: 1px; }
.field:has([aria-invalid="true"]) { border-color: #b5514a; }
.field .icon { width: 16px; height: 16px; }
.field input { padding: 9px 0; min-width: 0; width: 100%; border: 0; outline: 0; color: #24342a; background: transparent; font-size: 14px; }
.field input::placeholder, .text-input::placeholder { color: #69766c; opacity: 1; }
.button { min-height: 38px; display: inline-flex; gap: 7px; align-items: center; justify-content: center; padding: 8px 12px; border: 1px solid transparent; border-radius: 9px; line-height: 1.2; font-size: 13px; font-weight: 650; text-decoration: none; }
.button .icon { width: 16px; height: 16px; }
.primary { color: var(--white); background: var(--green); border-color: var(--green); }
.primary:hover { background: var(--dark-green); border-color: var(--dark-green); }
.primary:disabled { color: #546159; background: #e8ede7; border-color: #dfe6de; cursor: not-allowed; }
.secondary { background: var(--white); border-color: #dce5db; color: var(--green); }
.secondary:hover { background: var(--tint); border-color: #c8d9c9; }
.add-button { margin-top: 2px; min-height: 42px; }
.form-message { font-size: 12px; line-height: 1.45; color: var(--green); overflow-wrap: anywhere; }
.form-message.error { color: #9c352e; }

.collection { display: flex; flex-direction: column; padding: 15px 15px 20px; }
.search-field { margin-inline: 5px; min-height: 38px; background: #f8faf7; }
.job-list { padding: 0 5px; margin: 10px 0 0; max-height: 463px; overflow: auto; list-style: none; }
.job-list:empty { margin-top: 0; }
.job-list li { margin-block: 5px; }
.job-item { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px; min-height: 62px; border: 1px solid transparent; border-radius: 10px; text-align: left; background: var(--white); color: inherit; }
.job-item:hover { background: #f5f8f3; }
.job-item[aria-current="true"] { background: #edf4eb; border-color: #cddfcf; }
.small-tile, .job-tile { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border: 1px solid #dfe9de; border-radius: 9px; color: var(--green); background: #f2f7f0; }
.small-tile .icon { width: 17px; height: 17px; }
.job-item .small-tile { background: #fff; }
.job-item .item-text { flex: 1; min-width: 0; }
.job-item strong, .job-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-item strong { font-size: 13px; font-weight: 700; }
.job-item small { font-size: 11px; color: var(--muted); margin-top: 3px; }
.job-item > .icon { width: 15px; height: 15px; color: #61776a; }
.list-empty { text-align: center; display: flex; flex-direction: column; align-items: center; padding: 36px 8px; }
.list-empty p { font-size: 13px; font-weight: 650; margin-top: 10px; }
.list-empty > span:last-child { color: var(--muted); margin-top: 4px; font-size: 12px; }

.preview { display: flex; flex-direction: column; }
.preview-bar { min-height: 66px; padding: 10px 20px; border-bottom: 1px solid var(--line); }
.original-link { white-space: nowrap; }
.preview-empty { display: flex; flex: 1; flex-direction: column; justify-content: center; align-items: center; padding: 35px 18px 50px; text-align: center; }
.illustration { display: block; width: min(274px, 100%); height: auto; margin-bottom: 13px; }
.preview-empty h3 { font-size: 25px; letter-spacing: -.045em; font-weight: 720; }
.preview-empty p { max-width: 300px; margin-top: 9px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.sample-button { margin-top: 19px; }
.job-heading { display: flex; align-items: center; gap: 12px; margin: 19px 20px 14px; }
.job-tile { width: 44px; height: 44px; border-radius: 11px; background: var(--tint); }
.job-heading-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.job-heading-text h3 { font-size: clamp(19px, 3vw, 24px); line-height: 1.2; letter-spacing: -.035em; }
.job-heading-text p { color: var(--muted); margin-top: 4px; font-size: 13px; }
.edit-button { flex: none; }
.view-controls { display: flex; flex-wrap: wrap; align-items: stretch; gap: 0 13px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.view-tab { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 5px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 13px; font-weight: 650; }
.view-tab:hover, .view-tab[aria-pressed="true"] { color: var(--green); }
.view-tab[aria-pressed="true"] { border-bottom-color: var(--green); }
.view-tab .icon { width: 15px; height: 15px; }
.website-view { padding: 14px 20px 20px; }
.frame-note { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 8px; background: #f1f5ee; color: #43594a; font-size: 12px; line-height: 1.45; margin-bottom: 10px; }
.frame-note .icon { width: 15px; height: 15px; margin-top: 1px; }
.frame-host { overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: #fcfdfa; }
.frame-host iframe { width: 100%; height: clamp(380px, 60vh, 740px); border: 0; display: block; }
.posting-fallback { display: flex; align-items: flex-start; gap: 12px; padding: 4px 0 10px; }
.posting-fallback h4, .ai-result h4 { margin: 0 0 4px; font-size: 15px; }
.posting-fallback p, .ai-privacy { color: var(--muted); font-size: 13px; line-height: 1.5; }
.posting-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.website-view .posting-actions:not([hidden]) + .frame-host:not([hidden]) { margin-top: 10px; }
.details-view { padding: 18px 20px 22px; overflow-wrap: anywhere; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.detail-grid > div, .notes-block { padding: 14px; border-radius: 9px; background: #f7f9f6; border: 1px solid var(--line); }
.detail-grid .detail-wide { grid-column: 1 / -1; }
.detail-grid dt, .notes-block h4 { margin: 0 0 5px; color: #405147; font-weight: 700; font-size: 12px; }
.detail-grid dd, .notes-block p { font-size: 14px; line-height: 1.55; }
.notes-block { margin-top: 12px; }
.notes-block p { white-space: pre-wrap; }
.notes-placeholder { color: var(--muted); }
.description-block .posting-actions { margin-top: 12px; }

.ai-view { padding: 18px 20px 22px; overflow-wrap: anywhere; }
#ai-form, .ai-fields { display: grid; gap: 10px; }
.ai-connection { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.ai-connection p { min-width: 0; }
.ai-fields span { color: var(--muted); font-weight: 400; }
.ai-fields > .button { justify-self: start; }
.ai-result { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.ai-result pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 10px 0 0; padding: 12px; max-height: 480px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: #f7f9f6; font: inherit; font-size: 14px; line-height: 1.55; }
.mock-interview { display: grid; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.mock-interview h4 { margin: 0; font-size: 15px; }
.mock-transcript { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.mock-transcript:empty { display: none; }
.mock-transcript li { padding: 10px 12px; border-left: 3px solid var(--green); background: #f7f9f6; font-size: 14px; }
.mock-transcript .mock-answer { border-color: var(--line); background: #fff; }
.mock-transcript p { margin-top: 4px; line-height: 1.55; white-space: pre-wrap; }
#mock-form { display: grid; gap: 8px; }
#mock-form label { font-size: 13px; font-weight: 650; }
.mock-interview .button:disabled { opacity: .55; cursor: default; }

.footer { display: flex; justify-content: space-between; gap: 14px; padding: 17px 0 26px; font-size: 12px; color: var(--muted); }
.footer span span { color: #79877d; margin-inline: 4px; }

dialog { width: min(500px, calc(100% - 28px)); max-height: min(90vh, 700px); padding: 22px; border: 1px solid var(--line); border-radius: 16px; color: inherit; background: var(--white); box-shadow: 0 18px 64px #1c402d30; }
dialog::backdrop { background: #172a20a0; }
#edit-form, #ai-settings-form { display: grid; gap: 8px; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-heading h2 { font-size: 22px; letter-spacing: -.04em; }
.icon-button { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 7px; border: 1px solid var(--line); background: var(--white); color: var(--green); }
.icon-button:hover { background: var(--tint); }
.dialog-intro { color: var(--muted); font-size: 14px; margin-bottom: 6px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-grid > div { display: grid; gap: 6px; min-width: 0; }
.text-input { width: 100%; border: 1px solid #dce4db; border-radius: 8px; background: #fcfdfa; color: inherit; padding: 9px 10px; font-size: 14px; }
textarea.text-input { resize: vertical; min-height: 85px; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.remove-button { margin-right: auto; color: #913831; background: transparent; }
.remove-button:hover { background: #fff0ed; }
.remove-confirm { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; background: #fff2ee; padding: 9px; border-radius: 8px; }
.remove-confirm p { font-size: 13px; flex: 1 1 180px; }
.danger { background: #963a32; color: var(--white); }
.danger:hover { background: #7e2d27; }

@media (max-width: 850px) {
  .container { width: calc(100% - 40px); }
  .workspace { gap: 14px; grid-template-columns: minmax(235px, 280px) minmax(0, 1fr); }
}

@media (max-width: 680px) {
  .container { width: calc(100% - 28px); }
  .topbar { height: auto; min-height: 60px; }
  .topbar-inner { flex-wrap: wrap; padding-block: 10px; }
  .topbar-actions { flex-wrap: wrap; }
  .topbar .local-badge { display: none; }
  .topbar .local-badge.temporary { display: inline-flex; }
  .bilingual-table th, .bilingual-table td { padding: 8px; font-size: 13px; }
  .brand { font-size: 22px; }
  .brand-mark { width: 33px; height: 33px; }
  .local-badge { font-size: 11px; padding: 6px 8px; }
  .intro { padding: 28px 0 22px; }
  .intro > p:last-child { font-size: 14px; }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .panel { min-height: 0; }
  .preview-bar { min-height: 58px; }
  .preview-empty { min-height: 325px; padding: 20px 12px 30px; }
  .illustration { width: min(235px, 100%); }
  .library-top, .preview-bar, .website-view, .details-view, .ai-view { padding-inline: 14px; }
  .collection { padding: 12px 9px 13px; }
  .list-empty { padding: 18px 8px 8px; }
  .job-list { max-height: 245px; }
  .job-heading { margin-inline: 14px; }
  .view-controls { padding-inline: 14px; }
  .footer { flex-wrap: wrap; gap: 6px 14px; }
}

@media (max-width: 360px) {
  .topbar .local-badge:not(.temporary) { display: none; }
  .topbar-inner { gap: 8px; }
  .topbar .local-badge.temporary { white-space: normal; }
  .topbar .local-badge.temporary .icon { display: none; }
  .view-controls { gap: 0 7px; }
  .view-tab { padding-inline: 3px; }
  .view-tab .icon { display: none; }
  .job-heading { flex-wrap: wrap; }
  .job-heading-text { flex-basis: calc(100% - 60px); }
  .detail-grid, .form-grid { grid-template-columns: minmax(0, 1fr); }
}
