/* Supertext Translation for HubSpot, in Supertext's look (supertext.com): deep green, mint, warm off-white, Inter. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/static/fonts/inter-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/static/fonts/inter-latin-ext-wght-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root {
  --bg: #f7f5f3;          /* Supertext's warm off-white */
  --card: #ffffff;
  --text: #003230;        /* deep green: text, headings, outlines */
  --muted: #505252;
  --line: #dfe1df;
  --teal: #003230;        /* links and outlined buttons */
  --teal-dark: #001f1e;
  --teal-light: #eef1ef;  /* hover */
  --mint: #78ffaf;        /* main actions, highlights */
  --mint-hover: #86ffb7;
  --mint-light: #e4fff0;
  --green: #2bb673;
  --green-light: #e4fff0;
  --orange: #a35a00;
  --orange-light: #fff6e8;
  --red: #c4314b;
  --red-light: #fdebee;
  --yellow: #fff6e8;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; font-feature-settings: "cv11"; }
a { color: var(--teal); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
h1, h2, h3 { color: var(--text); letter-spacing: -0.01em; }
h1 { font-size: 30px; font-weight: 700; margin: 0 0 8px; letter-spacing: -0.02em; }
h2 { font-size: 18px; font-weight: 650; margin: 0 0 12px; }
h2:not(:first-child) { margin-top: 28px; }
h3 { font-size: 14px; font-weight: 650; margin: 22px 0 4px; }
code { font: 12px/1 ui-monospace, Menlo, monospace; background: var(--bg); padding: 3px 6px; border-radius: 6px; color: var(--muted); }

/* The header: Supertext's deep-green bar with rounded bottom corners and the mint logo. */
.topbar { display: flex; align-items: center; gap: 28px; background: var(--text); color: #fff; padding: 0 28px; height: 64px; max-width: 1180px; margin: 0 auto; border-radius: 0 0 15px 15px; }
.brand { display: flex; align-items: center; gap: 12px; white-space: nowrap; text-decoration: none; }
.brand img { height: 22px; width: auto; display: block; }
.brand .for { font-size: 15px; color: rgba(255, 255, 255, .72); }
.tabs { display: flex; gap: 6px; }
.tab { display: flex; align-items: center; padding: 7px 16px; color: rgba(255, 255, 255, .8); border-radius: 999px; text-decoration: none; font-size: 15px; }
.tab:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.tab.active { color: var(--text); background: var(--mint); font-weight: 600; }
.account { color: rgba(255, 255, 255, .72); font-size: 13px; white-space: nowrap; }
.langs { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; }
.langs a { color: var(--muted); text-decoration: none; }
.langs a.active { color: var(--text); font-weight: 600; }

.page { max-width: 1060px; margin: 0 auto; padding: 28px 32px 48px; }
.intro { color: var(--muted); margin: 0 0 20px; max-width: 760px; }
.card { background: var(--card); border-radius: 15px; padding: 26px 28px; margin: 0 0 20px; border: 1px solid var(--line); }
.muted { color: var(--muted); }
.help { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.warning-text { color: var(--orange); }
.spacer { flex: 1; }

.connect { max-width: 640px; margin: 24px auto; }
.connect .points { margin: 16px 0 0; padding-left: 20px; }
.connect .points li { margin: 6px 0; }

.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; max-width: 460px; }
.field > span { font-weight: 600; font-size: 13px; }
input[type=text], input[type=password], input:not([type]), select {
  font: inherit; color: var(--text); border: 1px solid #c8cbc8; border-radius: 10px; padding: 8px 12px; background: #fff; min-height: 42px;
}
input:focus, select:focus { outline: 3px solid var(--mint); outline-offset: 0; border-color: var(--text); }
.inline { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; cursor: pointer; }
.inline.strong { font-weight: 600; }
input[type=checkbox], input[type=radio] { width: 17px; height: 17px; accent-color: var(--text); margin: 0; }

/* Pill buttons as on supertext.com: mint for the main action, a deep-green outline for the others. */
button, .button { display: inline-flex; align-items: center; font: inherit; font-size: 15px; font-weight: 500; letter-spacing: .2px; border-radius: 999px; padding: 9px 22px; border: 1px solid var(--text); background: transparent; color: var(--text); cursor: pointer; min-height: 42px; text-decoration: none; transition: background-color .15s, border-color .15s; }
button:hover, .button:hover { background: var(--line); border-color: transparent; text-decoration: none; }
button.primary, .button.primary { background: var(--mint); border-color: var(--mint); color: var(--text); font-weight: 600; }
button.primary:hover, .button.primary:hover { background: var(--mint-hover); border-color: var(--mint-hover); }
button.danger { border-color: var(--red); color: var(--red); background: transparent; }
button.danger:hover { background: var(--red-light); }
button:disabled, .button[aria-disabled] { opacity: .45; cursor: default; pointer-events: none; }
.actions { display: flex; align-items: center; gap: 14px; margin-top: 20px; }
form.settings > .actions { margin: 0 0 28px; }
.card > .help + .field { margin-top: 16px; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.title { font-weight: 600; }
td.title label { cursor: pointer; display: block; }
td.title .sub { display: block; font-weight: 400; font-size: 13px; margin-top: 2px; }
th.check, td.check { width: 36px; }
td.when { white-space: nowrap; color: var(--muted); font-size: 13px; }
td.link { text-align: right; white-space: nowrap; }
.pager { display: flex; align-items: center; gap: 16px; margin-top: 10px; }

.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; white-space: nowrap; text-decoration: none; }
.badge.none { background: var(--bg); color: var(--muted); }
.badge.state-draft { background: var(--orange-light); color: var(--orange); }
.badge.state-published { background: var(--mint-light); color: var(--text); }
.badge.state-scheduled, .badge.state-other { background: var(--bg); color: var(--muted); }
.badge.done { background: var(--mint); color: var(--text); }
a.badge.done:hover { text-decoration: none; background: var(--mint-hover); }

.languages { display: flex; flex-wrap: wrap; gap: 10px; }
.language { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; cursor: pointer; background: #fff; }
.language:has(input:checked) { border-color: var(--text); background: var(--mint-light); }
.overwrite { margin-top: 20px; font-weight: 600; }
.tip { margin-top: 16px; }

.notice { border-radius: 12px; padding: 13px 18px; margin: 0 0 20px; border-left: 4px solid var(--text); background: var(--teal-light); }
.notice p { margin: 6px 0 0; }
.notice.success { border-color: var(--mint); background: var(--mint-light); }
.notice.warning { border-color: var(--orange); background: var(--orange-light); }
.notice.error { border-color: var(--red); background: var(--red-light); }
.card .notice { margin: 12px 0 0; }

.job .results { margin-top: 14px; }
.job > .muted { margin: -6px 0 0; font-size: 13px; }
.progress { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; font-weight: 600; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--text); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.result.created, .result.updated { color: var(--text); font-weight: 650; }
.result.created::before, .result.updated::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-right: 8px; vertical-align: 1px; }
.result.kept { color: var(--muted); }
.result.failed { color: var(--red); }
.result .note { display: block; font-weight: 400; font-size: 13px; color: var(--muted); }

.codes td { padding: 6px 10px; }
.codes tr.other td { color: var(--muted); }
.codes tr.other select { opacity: .55; }
#test-result.ok { color: var(--text); font-weight: 600; }
#test-result.failed { color: var(--red); }
.about p, .connection p { margin: 0; }
.connection form { margin-top: 14px; }

.kinds { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.kinds a { padding: 6px 16px; border-radius: 999px; border: 1px solid var(--text); color: var(--muted); font-size: 14px; background: transparent; text-decoration: none; }
.kinds a.active { background: var(--text); border-color: var(--text); color: #fff; font-weight: 600; }
.kinds a:hover { text-decoration: none; background: var(--line); border-color: transparent; color: var(--text); }
td.lang { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* Wide tables scroll inside their card instead of widening the page. */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; padding: 0 4px; }
.table-scroll table.items th, .table-scroll table.items td { white-space: nowrap; }
.table-scroll table.items td.title { white-space: normal; min-width: 160px; }
.codes select { width: 100%; min-width: 0; max-width: 340px; }
.codes select.missing, .combo .combo-input.missing { border-color: var(--orange); color: var(--orange); }
.codes tr.other .combo-input { opacity: .55; }
/* Searchable dropdown (public/app.js): a text field over a hidden select. */
.combo { position: relative; max-width: 340px; }
.combo-native { display: none; }
.combo .combo-input { width: 100%; min-width: 0; padding-right: 32px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%23003230' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center; text-overflow: ellipsis; }
.combo .combo-input:focus { background-image: none; }
.combo-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px 0; list-style: none; max-height: 280px; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 50, 48, .14); }
.combo-list [role="option"] { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; cursor: pointer; }
.combo-list [role="option"] code { color: var(--muted); font-size: 13px; background: none; padding: 0; }
.combo-list [role="option"].active { background: var(--mint); color: var(--text); }
.combo-list [role="option"].active code { color: var(--text); }
.combo-list [role="option"][aria-selected="true"] { font-weight: 600; }
.combo-group { padding: 8px 12px 4px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.combo-empty { padding: 8px 12px; color: var(--muted); }
.codes .hs-code { display: block; font-size: 12px; color: var(--muted); }
/* Translation review: a checkbox per language; its label only where the table header is hidden (phones). */
.codes th:nth-child(4), .codes td.review { text-align: center; white-space: nowrap; }
.codes td.review label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.codes .review-label { display: none; }
html { -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }

/* Phones */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .topbar { flex-wrap: wrap; height: auto; padding: 14px 16px 10px; gap: 10px 12px; border-radius: 0 0 15px 15px; }
  .brand { order: 1; }
  .brand img { height: 19px; }
  .topbar > .spacer { order: 2; }
  .tabs { order: 3; width: 100%; }
  .tab { padding: 6px 16px; }
  .account { display: none; }
  .page { padding: 20px 16px 40px; }
  h1 { font-size: 24px; }
  .card { padding: 20px 16px; border-radius: 12px; }
  .connect { margin: 8px auto; }
  .field { max-width: none; }
  input[type=text], input[type=password], input:not([type]), select { font-size: 16px; width: 100%; }
  .actions { flex-wrap: wrap; }
  .actions button, .actions .button { flex: 1 1 auto; justify-content: center; }
  .languages { flex-direction: column; gap: 8px; }
  .language { width: 100%; }
  .kinds { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 16px; padding: 0 16px; }
  .kinds a { white-space: nowrap; flex: none; }
  /* Languages table: checkbox and name, the Supertext code below. */
  .codes thead { display: none; }
  .codes tr { display: grid; grid-template-columns: 32px 1fr; grid-template-areas: "check name" "check code"; column-gap: 8px; row-gap: 6px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .codes tr:last-child { border-bottom: 0; }
  .codes td { padding: 0; border: 0; }
  .codes td:nth-child(1) { grid-area: check; align-self: start; padding-top: 3px; }
  .codes td:nth-child(2) { grid-area: name; }
  .codes td:nth-child(2) .hs-code { display: inline; margin-left: 6px; }
  .codes td:nth-child(3) { grid-area: code; }
  .codes tr:has(td.review) { grid-template-areas: "check name" "check code" "check review"; }
  .codes td.review { grid-area: review; text-align: left; }
  .codes .review-label { display: inline; font-size: 14px; }
  .codes select, .combo { max-width: none; }
  .codes select, .combo-input { font-size: 16px; min-height: 40px; } /* 16px: no zoom on iPhone */
  table.results, table.results tbody { display: block; }
  table.results tr { display: flex; flex-wrap: wrap; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  table.results tr:last-child { border-bottom: 0; }
  table.results td { padding: 0; border: 0; }
  table.results td.link { margin-left: auto; text-align: left; }
  .history table.results td.when { width: 100%; }
  form.settings > .actions { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; margin: 0 0 20px; z-index: 2; }
}

/* Translation files: export formats on the Translate page, import summary */
.formats { border: 0; padding: 0; margin: 10px 0 0; }
.formats legend { font-weight: 600; font-size: 13px; padding: 0; }
ul.counts { list-style: none; margin: 0; padding: 0; }
ul.counts li { margin: 0 0 2px; }
#export-section { margin-top: 28px; padding-top: 4px; border-top: 1px solid var(--line); }
