:root {
  color-scheme: light;
  --ink: #182b2b;
  --body: #586969;
  --muted: #879493;
  --line: #dce6e1;
  --line-soft: #e8efeb;
  --paper: #ffffff;
  --canvas: #f2f6f3;
  --forest: #1d4940;
  --forest-soft: #e8f2ed;
  --orange: #d87854;
  --blue: #5475a3;
  font-family: "Segoe UI", "Noto Sans", "Helvetica Neue", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: var(--canvas); font-size: 14px; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid #3e9081; outline-offset: 3px; }
[hidden] { display: none !important; }

.site-header { height: 64px; display: flex; align-items: center; gap: 42px; padding: 0 max(32px, calc((100% - 1320px) / 2)); border-bottom: 1px solid var(--line); background: #fbfdfb; }
.brand { display: inline-flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.brand-mark { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 10px 10px 10px 3px; background: var(--forest); color: #fff; font-size: 14px; font-weight: 750; letter-spacing: 0; }
.brand-name, .footer-brand { color: var(--ink); font-size: 15px; font-weight: 750; letter-spacing: 0; }
.brand-name span, .footer-brand span { color: var(--forest); font-weight: 500; }
.header-nav { display: flex; align-items: center; align-self: stretch; gap: 26px; min-width: 0; }
.nav-link { display: inline-flex; align-items: center; position: relative; color: #73817e; font-size: 12px; white-space: nowrap; }
.nav-link.active { color: var(--ink); font-weight: 650; }
.nav-link.active::after { position: absolute; right: 0; bottom: 0; left: 0; height: 2px; content: ""; background: var(--forest); }
.header-meta { display: flex; align-items: center; gap: 8px; margin-left: auto; color: var(--body); font-size: 11px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #5da681; }

main { width: min(1320px, calc(100% - 64px)); margin: 0 auto; }
.intro { min-height: 244px; display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 35px 2px 30px; }
.eyebrow, .section-kicker, .count-label { color: #758580; font-size: 10px; font-weight: 700; letter-spacing: 1px; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 14px; text-transform: uppercase; }
.eyebrow-rule { width: 20px; height: 1px; background: var(--orange); }
h1 { margin: 0; color: #19362f; font-size: 42px; line-height: 1.1; font-weight: 660; letter-spacing: 0; }
h1 em { color: var(--forest); font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
.intro-description { max-width: 450px; margin: 13px 0 0; color: #61716e; font-size: 13px; line-height: 1.6; }
.collection-count { min-width: 180px; display: grid; justify-items: end; gap: 3px; padding: 0 8px 3px 28px; border-left: 1px solid #d8e3dd; color: var(--muted); font-size: 11px; }
.collection-count strong { color: var(--ink); font-size: 38px; line-height: 1.1; font-weight: 620; font-variant-numeric: tabular-nums; }
.count-label { margin-bottom: 2px; font-size: 9px; }

.directory { display: grid; grid-template-columns: 218px minmax(0, 1fr); gap: 34px; padding: 23px 0 70px; border-top: 1px solid #d9e3de; }
.category-panel { min-width: 0; }
.section-kicker { margin-bottom: 9px; font-size: 9px; }
.category-panel h2, .tools-toolbar h2 { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 650; letter-spacing: 0; }
.category-list { display: grid; gap: 3px; margin-top: 17px; }
.category-link { width: 100%; min-height: 39px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 10px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: #64736f; text-align: left; cursor: pointer; }
.category-link span:first-child { font-size: 12px; }
.category-link:hover { background: #eaf0ec; }
.category-link.active { border-color: #d5e4dc; background: var(--forest-soft); color: var(--forest); font-weight: 650; }
.category-count { color: #87948f; font-size: 10px; font-variant-numeric: tabular-nums; }
.category-link.active .category-count { color: var(--forest); }
.aside-note { display: flex; align-items: flex-start; gap: 9px; margin-top: 36px; padding-top: 14px; border-top: 1px solid var(--line); }
.aside-note-mark { width: 18px; height: 18px; display: grid; flex: 0 0 auto; place-items: center; border: 1px solid #b8c8c0; border-radius: 50%; color: var(--forest); font-size: 13px; line-height: 1; }
.aside-note p { margin: 1px 0 0; color: #7c8985; font-size: 10px; line-height: 1.55; }

.tools-toolbar { min-height: 49px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 17px; }
.tools-toolbar h2 { display: flex; align-items: center; gap: 9px; }
.tools-toolbar h2 span { color: #81908b; font-size: 11px; font-weight: 500; font-variant-numeric: tabular-nums; }
.search-field { width: min(260px, 42%); height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 9px; border: 1px solid #d8e2dd; border-radius: 4px; background: #fbfdfb; color: #85928e; }
.search-field:focus-within { border-color: #8aafa0; box-shadow: 0 0 0 2px #e4efe9; }
.search-field svg { width: 15px; height: 15px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.search-field input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 11px; }
.search-field input::placeholder { color: #9aa6a1; }
.search-field kbd { min-width: 18px; height: 19px; display: grid; place-items: center; border: 1px solid #e2e8e4; border-radius: 3px; background: #f8faf8; color: #87948f; font: 10px "Segoe UI", sans-serif; }

.tools-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.tool-card { min-width: 0; overflow: hidden; border: 1px solid #d9e3de; border-radius: 6px; background: var(--paper); transition: border-color .16s ease, transform .16s ease; }
.tool-card:hover { transform: translateY(-2px); border-color: #adc3b7; }
.tool-image-link { height: 185px; display: block; position: relative; overflow: hidden; background: #e7ede9; }
.tool-image { width: 100%; height: 100%; display: block; object-fit: cover; object-position: top center; transition: transform .25s ease; }
.tool-image-link:hover .tool-image { transform: scale(1.025); }
.image-open { width: 32px; height: 32px; display: grid; place-items: center; position: absolute; right: 12px; bottom: 12px; border: 1px solid #ffffffb8; border-radius: 50%; background: #ffffffed; color: var(--forest); }
.image-open svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tool-card-body { padding: 16px 17px 15px; }
.tool-card-meta { min-height: 16px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tool-label { color: var(--blue); font-size: 9px; font-weight: 700; letter-spacing: .8px; }
.tool-status { display: inline-flex; align-items: center; gap: 6px; color: #62816f; font-size: 10px; }
.tool-status i { width: 6px; height: 6px; border-radius: 50%; background: #5da681; }
.tool-card h3 { margin: 11px 0 5px; color: #1e3732; font-size: 16px; line-height: 1.35; font-weight: 650; letter-spacing: 0; }
.tool-card p { min-height: 37px; max-width: 47ch; margin: 0; color: #72807c; font-size: 11px; line-height: 1.65; }
.tool-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.tool-category { color: #7f8e88; font-size: 10px; }
.open-link { display: inline-flex; align-items: center; gap: 9px; min-height: 31px; color: var(--forest); font-size: 11px; font-weight: 650; }
.open-link span { color: var(--orange); font-size: 15px; }
.open-link:hover { color: #397a68; }
.empty-state { min-height: 230px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 1px dashed #cbd8d1; border-radius: 5px; color: #7c8985; font-size: 11px; }
.empty-state strong { color: #425650; font-size: 13px; }
.empty-mark { color: var(--orange); font-size: 22px; line-height: 1; }
.load-error { padding: 14px; border: 1px solid #e7c7bb; border-radius: 4px; background: #fff7f3; color: #a45139; font-size: 12px; }

.site-footer { min-height: 64px; display: flex; align-items: center; gap: 18px; padding: 0 max(32px, calc((100% - 1320px) / 2)); border-top: 1px solid var(--line); background: #fbfdfb; color: #83908b; font-size: 10px; }
.footer-brand { margin-right: 3px; font-size: 12px; }
.checker-shortcut { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; color: var(--forest); font-size: 10px; font-weight: 600; }
.checker-shortcut span { color: var(--orange); font-size: 14px; }

@media (min-width: 1500px) {
  .tool-image-link { height: 205px; }
}
@media (max-width: 900px) {
  .site-header { gap: 28px; padding-inline: 22px; }
  .header-nav { gap: 20px; overflow-x: auto; scrollbar-width: none; }
  .header-nav::-webkit-scrollbar { display: none; }
  main { width: calc(100% - 44px); }
  .intro { min-height: 226px; }
  .directory { grid-template-columns: 185px minmax(0, 1fr); gap: 22px; }
  .tools-grid { grid-template-columns: minmax(0, 1fr); }
  .tool-image-link { height: 210px; }
  .site-footer { padding-inline: 22px; }
}
@media (max-width: 600px) {
  .site-header { height: auto; min-height: 61px; align-items: center; flex-wrap: wrap; gap: 0; padding: 12px 15px 0; }
  .brand { gap: 8px; }
  .brand-mark { width: 33px; height: 33px; border-radius: 9px 9px 9px 3px; }
  .brand-name { font-size: 13px; }
  .header-nav { width: 100%; height: 31px; flex: 0 0 100%; align-self: auto; gap: 17px; margin-top: 10px; overflow-x: auto; }
  .nav-link { font-size: 11px; }
  .header-meta { display: none; }
  main { width: calc(100% - 30px); }
  .intro { min-height: 216px; align-items: flex-start; flex-direction: column; gap: 18px; padding: 27px 0 22px; }
  .eyebrow { margin-bottom: 11px; font-size: 9px; }
  h1 { font-size: 34px; line-height: 1.1; }
  .intro-description { max-width: 320px; margin-top: 9px; font-size: 12px; }
  .collection-count { display: flex; align-items: baseline; justify-items: initial; gap: 7px; min-width: 0; padding: 0; border: 0; }
  .collection-count strong { font-size: 17px; }
  .count-label { margin: 0; font-size: 8px; }
  .collection-count > span:last-child { font-size: 10px; }
  .directory { display: flex; flex-direction: column; gap: 20px; padding: 19px 0 45px; }
  .category-panel h2 { font-size: 16px; }
  .category-list { display: flex; gap: 6px; overflow-x: auto; margin-top: 10px; padding-bottom: 2px; }
  .category-link { width: auto; min-width: max-content; min-height: 34px; gap: 11px; padding: 0 9px; }
  .category-link span:first-child { font-size: 10px; }
  .category-count { font-size: 9px; }
  .aside-note { display: none; }
  .tools-toolbar { min-height: 0; align-items: stretch; flex-direction: column; gap: 12px; margin-bottom: 12px; }
  .tools-toolbar h2 { font-size: 16px; }
  .search-field { width: 100%; height: 37px; }
  .tools-grid { gap: 12px; }
  .tool-image-link { height: 170px; }
  .tool-card-body { padding: 13px 13px 12px; }
  .tool-card h3 { margin-top: 9px; font-size: 15px; }
  .tool-card p { min-height: 0; }
  .tool-card-footer { margin-top: 13px; padding-top: 10px; }
  .site-footer { align-items: flex-start; flex-wrap: wrap; gap: 8px 12px; min-height: 74px; padding: 13px 15px; }
  .footer-brand { margin-right: 0; }
  .site-footer > span { align-self: center; font-size: 9px; }
  .checker-shortcut { flex: 0 0 100%; margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* Text-to-table workspace */
.converter-main { width: min(1320px, calc(100% - 64px)); margin: 0 auto; }
.converter-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; padding: 48px 2px 36px; border-bottom: 1px solid #d9e3de; }
.converter-hero h1 { max-width: 680px; font-size: 42px; }
.converter-hero .intro-description { max-width: 580px; }
.back-link { display: inline-flex; align-items: center; min-height: 34px; color: var(--forest); font-size: 12px; font-weight: 650; white-space: nowrap; }
.back-link:hover { color: #397a68; }
.converter-workspace { display: grid; grid-template-columns: minmax(300px, .82fr) minmax(0, 1.4fr); gap: 18px; padding: 26px 0 72px; }
.converter-panel { min-width: 0; overflow: hidden; border: 1px solid #d9e3de; border-radius: 6px; background: var(--paper); }
.converter-panel-heading { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 17px; border-bottom: 1px solid var(--line-soft); }
.converter-panel-heading h2 { margin: 0; color: #1e3732; font-size: 18px; line-height: 1.3; font-weight: 650; }
.panel-heading-meta { display: flex; align-items: center; justify-content: flex-end; gap: 9px; min-width: 0; }
.panel-count { color: #7f8e88; font-size: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.copy-status { max-width: 120px; overflow: hidden; color: #4b8a71; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.input-panel { padding-bottom: 17px; }
.file-drop { min-height: 78px; display: flex; align-items: center; gap: 12px; position: relative; margin: 17px; padding: 13px 14px; border: 1px dashed #b8cbc0; border-radius: 5px; background: #f8fbf9; color: var(--forest); cursor: pointer; transition: border-color .16s ease, background .16s ease; }
.file-drop:hover, .file-drop.dragging { border-color: #6d9e8c; background: var(--forest-soft); }
.file-drop input { width: 1px; height: 1px; position: absolute; opacity: 0; }
.file-drop-icon { width: 29px; height: 29px; display: grid; flex: 0 0 auto; place-items: center; border: 1px solid #c7d9cf; border-radius: 50%; color: var(--forest); font-size: 17px; line-height: 1; }
.file-drop strong, .file-drop small { display: block; }
.file-drop strong { color: #315c50; font-size: 12px; }
.file-drop small { margin-top: 3px; color: #879790; font-size: 10px; }
.converter-fields { display: grid; grid-template-columns: minmax(110px, .7fr) minmax(0, 1.3fr); gap: 10px; margin: 0 17px 14px; }
.converter-fields label { display: grid; gap: 6px; min-width: 0; }
.converter-fields span, .converter-label { color: #71817a; font-size: 10px; }
.converter-fields input { width: 100%; min-width: 0; height: 35px; padding: 0 9px; border: 1px solid #d8e2dd; border-radius: 4px; outline: 0; background: #fbfdfb; color: var(--ink); font-size: 11px; }
.converter-fields input:focus { border-color: #8aafa0; box-shadow: 0 0 0 2px #e4efe9; }
.converter-label { display: block; margin: 0 17px 7px; }
#source-input { width: calc(100% - 34px); min-height: 210px; display: block; resize: vertical; margin: 0 17px; padding: 11px 12px; border: 1px solid #d8e2dd; border-radius: 4px; outline: 0; background: #fbfdfb; color: var(--ink); font: 12px/1.65 "Cascadia Mono", Consolas, monospace; }
#source-input:focus { border-color: #8aafa0; box-shadow: 0 0 0 2px #e4efe9; }
#source-input::placeholder { color: #a0aca6; }
.converter-input-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 9px 17px 16px; color: #94a19b; font-size: 10px; }
.text-button { padding: 0; border: 0; background: transparent; color: #6d8d80; font-size: 10px; cursor: pointer; }
.text-button:hover { color: var(--forest); }
.button { min-height: 36px; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid #d3e0d8; border-radius: 4px; background: #fbfdfb; color: #476158; font-size: 11px; font-weight: 650; cursor: pointer; transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.button:hover:not(:disabled) { border-color: #9eb9ab; background: #f4f9f5; transform: translateY(-1px); }
.button.primary { border-color: var(--forest); background: var(--forest); color: #fff; }
.button.primary:hover:not(:disabled) { border-color: #2a6457; background: #2a6457; }
.button:disabled { cursor: default; }
.converter-button { width: calc(100% - 34px); justify-content: center; margin: 0 17px; }
.preview-panel { display: flex; min-height: 500px; flex-direction: column; }
.preview-scroll { flex: 1 1 auto; overflow: auto; margin: 17px; border: 1px solid var(--line-soft); border-radius: 4px; }
.converter-table { width: 100%; min-width: 560px; border-collapse: collapse; table-layout: fixed; }
.converter-table th, .converter-table td { max-width: 310px; padding: 10px 11px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; word-break: break-word; }
.converter-table th { position: sticky; top: 0; z-index: 1; background: #f5f9f6; color: #466057; font-size: 10px; font-weight: 700; }
.column-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 78px; }
.column-header span { min-width: 0; overflow-wrap: anywhere; }
.copy-column { width: 24px; height: 24px; display: grid; flex: 0 0 auto; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 3px; background: transparent; color: #6f8d81; cursor: pointer; }
.copy-column:hover, .copy-column:focus-visible { border-color: #c6dad0; background: #eaf3ed; color: var(--forest); outline: 0; }
.copy-column.copied { border-color: #9fc7b1; background: #dcefe3; color: #247155; }
.copy-column svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.sr-only { width: 1px; height: 1px; position: absolute; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
.converter-table td { color: #60726a; }
.converter-table tbody tr:last-child td { border-bottom: 0; }
.converter-table tbody tr:hover td { background: #fbfdfb; }
.converter-empty { min-height: 352px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #87958f; font-size: 11px; }
.converter-empty strong { color: #425650; font-size: 13px; }
.converter-empty .empty-mark { color: var(--orange); font-size: 25px; }
.preview-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 67px; margin-top: auto; padding: 12px 17px; border-top: 1px solid var(--line-soft); color: #7f8e88; font-size: 10px; }
.download-button { min-height: 33px; }
.download-button:disabled { opacity: .46; cursor: not-allowed; }

@media (max-width: 900px) {
  .converter-main { width: calc(100% - 44px); }
  .converter-workspace { grid-template-columns: minmax(0, 1fr); }
  .preview-panel { min-height: 430px; }
}
@media (max-width: 600px) {
  .converter-main { width: calc(100% - 30px); }
  .converter-hero { align-items: flex-start; flex-direction: column; gap: 17px; padding: 29px 0 25px; }
  .converter-hero h1 { font-size: 34px; }
  .converter-hero .intro-description { margin-top: 10px; }
  .converter-workspace { gap: 12px; padding: 18px 0 45px; }
  .converter-fields { grid-template-columns: 1fr; }
  #source-input { min-height: 180px; }
  .converter-table { min-width: 500px; }
  .preview-footer { align-items: flex-start; flex-direction: column; gap: 10px; padding: 12px 13px; }
  .download-button { width: 100%; justify-content: center; }
}
