.ttc-page { background: #edf2f6; color: #183047; padding: 20px; }
.ttc-container { max-width: 1420px; margin: 0 auto 36px; }
.ttc-heading { margin-bottom: 24px; padding: 28px 30px; border-top: 4px solid #bd6526; }
.ttc-heading h1 { text-align: left; margin: 8px 0 12px; font-size: clamp(27px, 3.4vw, 38px); color: #153550; }
.ttc-heading > p { max-width: 820px; line-height: 1.6; }
.ttc-eyebrow { color: #885023; text-transform: uppercase; font-size: 11px; font-weight: 700; letter-spacing: .11em; margin: 0; }
.ttc-source-line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; border-top: 1px solid #d9e2e9; padding-top: 16px; margin-top: 20px; font-size: 13px; }
.ttc-source-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.ttc-container a { color: #155980; text-underline-offset: 3px; }
.ttc-page [hidden] { display: none !important; }
.ttc-workspace { min-width: 0; }
.ttc-filter-panel, .ttc-export-panel { min-width: 0; background: #fff; border: 1px solid #d6e0e8; border-radius: 12px; padding: 22px; }
.ttc-export-panel { margin-top: 22px; border-top: 4px solid #1f5970; }
.ttc-transfer-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 94px minmax(0, 1fr); gap: 12px; align-items: stretch; }
.ttc-transfer-help { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 20px; margin: 14px 0; color: #526577; font-size: 13px; line-height: 1.5; }
.ttc-transfer-help p { margin: 0; }
#transfer-status { color: #1d5164; font-weight: 600; }
.ttc-pane { box-sizing: border-box; min-width: 0; display: flex; flex-direction: column; height: clamp(460px, 68vh, 780px); background: #fff; border: 1px solid #bccdd9; border-radius: 10px; overflow: hidden; }
.ttc-pane-heading { flex: 0 0 auto; padding: 16px; border-bottom: 1px solid #d6e0e8; background: #f5f8fa; }
.ttc-pane-heading .ttc-toolbar { margin: 0 0 8px; }
.ttc-pane-heading p { margin: 0; font-size: 12px; color: #526577; line-height: 1.5; }
.ttc-selected-pane { border-top: 3px solid #1f5970; }
.ttc-pane-scroll { min-height: 0; flex: 1; overflow-y: auto; padding: 14px; scrollbar-gutter: stable; }
.ttc-pane-scroll > .ttc-empty { margin-top: 0; }
.ttc-transfer-controls { display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.ttc-transfer-controls .ttc-button { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; padding: 12px 5px; font-size: 12px; }
.ttc-transfer-controls .ttc-arrow { font-size: 32px; line-height: 1; }
.ttc-transfer-count { padding: 2px 7px; border-radius: 4px; background: #ffffff22; font-size: 12px; }
.ttc-transfer-controls .secondary .ttc-transfer-count { background: #e5eff2; }
.ttc-arrow { display: inline-block; }
.ttc-export-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
.ttc-page h2 { font-size: 20px; margin: 0; color: #153550; }
.ttc-toolbar, .ttc-results-heading, .ttc-selection-heading, .ttc-filter-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.ttc-toolbar { margin-bottom: 18px; }
.ttc-count { display: inline-block; border-radius: 6px; padding: 3px 7px; background: #e5eff2; color: #1d5164; font-size: 14px; }
.ttc-help { color: #526577; line-height: 1.55; font-size: 13px; margin: 10px 0; }
.ttc-help:empty { display: none; }
.ttc-search-label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 7px; }
.ttc-page #search { width: 100%; box-sizing: border-box; border: 1px solid #9db1c1; border-radius: 7px; background: #fff; padding: 12px; font-size: 15px; margin: 0 0 20px; color: #183047; }
.ttc-page #project-name { width: 100%; box-sizing: border-box; border: 1px solid #9db1c1; border-radius: 7px; background: #fff; padding: 12px; font-size: 15px; margin: 0; color: #183047; }
.ttc-filter-heading { font-size: 13px; margin-bottom: 10px; }
.ttc-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; align-items: start; }
.ttc-filter { border: 1px solid #cfdae3; border-radius: 6px; min-width: 0; }
.ttc-filter summary { cursor: pointer; padding: 11px; font-size: 13px; font-weight: 700; }
.ttc-filter summary span { color: #5d6e7e; font-size: 12px; font-weight: 400; }
.ttc-filter-options { max-height: 235px; overflow-y: auto; padding: 0 10px 10px; }
.ttc-filter-options label { display: flex; align-items: start; gap: 8px; font-size: 13px; font-weight: 400; line-height: 1.4; padding: 5px 0; overflow-wrap: anywhere; }
.ttc-filter-options input { width: 16px; height: 16px; flex: 0 0 auto; margin: 1px 0 0; accent-color: #1f5970; }
.ttc-filter-value { flex: 1; min-width: 0; }
.ttc-task-options { max-height: 320px; }
.ttc-filter-count { flex: 0 0 auto; color: #24536d; font-size: 12px; font-variant-numeric: tabular-nums; }
.ttc-code-legend { margin-top: 14px; border: 1px solid #c5d4df; border-radius: 8px; background: #fff; }
.ttc-code-legend > summary { cursor: pointer; padding: 14px 18px; color: #1d5164; font-size: 14px; font-weight: 700; }
.ttc-code-legend > summary > span { margin-left: 12px; font-size: 12px; font-weight: 400; color: #526577; }
.ttc-legend-content { padding: 0 18px 18px; }
.ttc-legend-content > .ttc-help { margin-top: 0; }
.ttc-legend-content h3 { margin: 0 0 10px; color: #153550; font-size: 14px; }
.ttc-legend-content code { font-size: .95em; overflow-wrap: anywhere; }
.ttc-legend-example { margin: 16px 0; padding: 14px; border-left: 3px solid #1f5970; background: #f2f7fa; border-radius: 4px; font-size: 13px; line-height: 1.5; }
.ttc-legend-example > p { margin: 0 0 10px; }
.ttc-legend-example dl { margin: 0 0 12px; }
.ttc-legend-example dl > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px; padding: 3px 0; }
.ttc-legend-example dt { font-family: monospace; font-weight: 600; }
.ttc-legend-example dd { margin: 0; }
.ttc-legend-example > p:last-child { margin-bottom: 0; }
.ttc-legend-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.ttc-legend-grid table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.ttc-legend-grid caption { padding: 4px 0 8px; font-size: 14px; font-weight: 700; text-align: left; color: #153550; }
.ttc-legend-grid th, .ttc-legend-grid td { padding: 7px 9px; border-bottom: 1px solid #e0e7ed; text-align: left; vertical-align: top; }
.ttc-legend-grid thead { background: #edf3f7; }
.ttc-legend-grid thead th:first-child { width: 30%; }
.ttc-legend-grid tbody th { font-weight: 600; color: #24536d; }
.ttc-legend-notation { margin-top: 22px; font-size: 13px; line-height: 1.6; }
.ttc-legend-notation ul { margin: 0; padding-left: 20px; }
.ttc-legend-notation li + li { margin-top: 8px; }
.ttc-legend-source { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin-top: 16px; font-size: 12px; }
.ttc-page .ttc-legend-source .ttc-preview-trigger { margin-bottom: 0; }
@media (max-width: 760px) {
  .ttc-legend-grid { grid-template-columns: 1fr; gap: 18px; }
  .ttc-code-legend > summary > span { display: block; margin: 5px 0 0 16px; }
}
@media (max-width: 520px) {
  .ttc-legend-example dl > div { grid-template-columns: 1fr; gap: 1px; padding: 5px 0; }
}
.ttc-filter-options label[data-empty="true"] { color: #5d6e7e; }
.ttc-filter-options label[data-empty="true"] .ttc-filter-count { color: #5d6e7e; }
.ttc-results-heading { margin: 20px 0 12px; font-size: 13px; }
.ttc-results-heading p { margin: 0; }
.ttc-results { display: grid; gap: 12px; }
.ttc-result { border: 1px solid #d3dfe8; border-radius: 8px; padding: 17px; background: #fff; }
.ttc-result.is-marked { border-color: #1f5970; box-shadow: inset 0 0 0 1px #1f5970; background: #edf6f8; }
.ttc-card-mark { display: flex; align-items: start; gap: 10px; cursor: pointer; min-width: 0; flex: 1; }
.ttc-card-mark input { width: 17px; height: 17px; flex: 0 0 auto; margin: 1px 0 0; accent-color: #1f5970; }
.ttc-select-all { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; cursor: pointer; white-space: nowrap; }
.ttc-select-all input { width: 17px; height: 17px; margin: 0; accent-color: #1f5970; }
.ttc-page .ttc-card-move { flex: 0 0 auto; min-width: 42px; min-height: 38px; padding: 3px 10px; font-size: 22px; line-height: 1; }
.ttc-possible { margin: 0 0 16px; border: 1px solid #cfa96a; border-radius: 8px; padding: 12px; background: #fffaf0; }
.ttc-possible > summary { cursor: pointer; color: #674912; font-size: 14px; font-weight: 700; line-height: 1.5; }
.ttc-possible > summary .ttc-count { background: #f4e7c8; color: #674912; }
.ttc-possible-reason { font-size: 13px; line-height: 1.5; background: #fff2d5; color: #674912; padding: 8px 10px; border-radius: 4px; }
.ttc-conditions { margin: 12px 0; padding: 10px 12px; border-left: 3px solid #65869a; background: #f0f5f8; color: #29495e; font-size: 13px; line-height: 1.5; }
.ttc-conditions .ttc-condition-heading { margin: 0 0 4px; font-size: 12px; font-weight: 700; }
.ttc-conditions ul { padding-left: 19px; margin: 0; }
.ttc-conditions li { padding: 0; border: 0; margin: 3px 0; }
.ttc-result-top { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.ttc-code { font-size: 13px; font-weight: 750; color: #205470; overflow-wrap: anywhere; }
.ttc-result h3 { font-size: 16px; line-height: 1.4; margin: 8px 0 12px; color: #183047; }
.ttc-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.ttc-tag { font-size: 11px; padding: 4px 7px; color: #425c70; background: #eef3f7; border-radius: 4px; }
.ttc-rcoc-yes { color: #166534; background: #dcfce7; border: 1px solid #86cda0; font-weight: 600; }
.ttc-rcoc-no { color: #991b1b; background: #fee2e2; border: 1px solid #e7aaaa; font-weight: 600; }
.ttc-filter-tag { max-width: 100%; box-sizing: border-box; overflow-wrap: anywhere; line-height: 1.4; color: #1d5164; background: #e5eff2; }
.ttc-paint-flag { display: inline-block; background: #fff0cb; color: #704409; border: 1px solid #d4ab64; font-weight: 700; }
.ttc-paint-flag.possible { background: #fff8ea; font-weight: 600; }
.ttc-paint-warning { font-weight: 600; }
.ttc-note { font-size: 13px; line-height: 1.5; padding: 8px 10px; margin: 12px 0; background: #fff6e9; border-left: 3px solid #c88b35; color: #68451b; overflow-wrap: anywhere; }
.ttc-note.warning { border-color: #b14637; background: #fff0ee; color: #862e23; font-weight: 700; }
.ttc-result-links { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; margin-top: 12px; }
.ttc-workbook-tag { max-width: 100%; box-sizing: border-box; overflow-wrap: anywhere; line-height: 1.4; }
.ttc-related { margin-top: 12px; padding-top: 12px; border-top: 1px solid #d9e3ea; }
.ttc-related summary { font-size: 13px; cursor: pointer; }
.ttc-related p { font-size: 13px; line-height: 1.5; }
.ttc-selected-list { display: grid; gap: 12px; list-style: none; padding: 0; margin: 0; }
.ttc-selected-list > li { min-width: 0; }
.ttc-automatic { margin-top: 18px; padding-top: 16px; border-top: 1px solid #dce4ea; }
.ttc-automatic > summary { cursor: pointer; font-size: 15px; font-weight: 700; color: #1d5164; }
.ttc-downloads { padding: 0; }
.ttc-page .ttc-button { width: auto; margin: 0; padding: 9px 12px; border-radius: 6px; border: 1px solid transparent; font: inherit; font-size: 13px; font-weight: 700; line-height: 1.35; cursor: pointer; box-shadow: none; transition: background .12s; }
.ttc-page .primary { background: #1c536d; color: #fff; border-color: #1c536d; }
.ttc-page .primary:hover { background: #153e51; }
.ttc-page .secondary { background: #fff; color: #24536d; border-color: #b4c6d3; }
.ttc-page .secondary:hover { background: #edf4f7; }
.ttc-page .ttc-button:disabled { opacity: .5; cursor: not-allowed; }
.ttc-page .ttc-text-button { width: auto; margin: 0; padding: 3px 0; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; color: #24536d; border: 0; border-radius: 0; background: none; text-decoration: underline; text-underline-offset: 3px; }
.ttc-page .ttc-download-button { display: block; box-sizing: border-box; width: 100%; min-height: 48px; padding: 12px 16px; font-size: 14px; }
.ttc-download-option + .ttc-download-option { margin-top: 18px; }
.ttc-download-option .ttc-help { margin: 8px 0 0; }
.ttc-page :is(button, input, summary, a, [tabindex]):focus-visible { outline: 3px solid #ba702f; outline-offset: 3px; }
.ttc-empty { color: #526577; background: #f2f6f9; padding: 18px; line-height: 1.5; border-radius: 6px; font-size: 14px; }
.ttc-error { color: #8b3025; background: #fff1ee; padding: 16px; border: 1px solid #d99d94; border-radius: 6px; }
#export-status { font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
#export-status[data-error="true"] { color: #8b3025; }
#export-progress { width: 100%; margin-top: 14px; accent-color: #1c536d; }
.ttc-mobile-jump, .ttc-mobile-back { display: none; }
.ttc-page .ttc-preview-trigger { margin-bottom: 12px; min-height: 34px; }
.ttc-drawing-preview { position: fixed; z-index: 1000; box-sizing: border-box; display: flex; flex-direction: column; width: min(820px, calc(100vw - 24px)); height: min(700px, calc(100dvh - 24px)); border: 1px solid #7d98aa; border-top: 4px solid #1f5970; border-radius: 10px; background: #fff; box-shadow: 0 12px 45px #132e4755; overflow: hidden; }
.ttc-preview-heading { display: flex; align-items: start; gap: 12px; padding: 14px 16px 10px; }
.ttc-preview-heading > div { min-width: 0; flex: 1; }
.ttc-preview-heading h2 { font-size: 16px; overflow-wrap: anywhere; }
.ttc-preview-heading p { margin: 5px 0 0; font-size: 12px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ttc-preview-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 0 16px 12px; font-size: 12px; }
.ttc-preview-controls label { margin: 0 0 0 auto; width: auto; font-size: 12px; }
.ttc-preview-controls select { width: auto; margin: 0; padding: 7px; font: inherit; color: #183047; background: #fff; border: 1px solid #b4c6d3; border-radius: 5px; }
.ttc-page .ttc-preview-controls .ttc-button { min-height: 34px; font-size: 12px; }
.ttc-preview-stage { min-height: 0; flex: 1; overflow: auto; overscroll-behavior: contain; padding: 12px; background: #e3eaf0; box-sizing: border-box; }
.ttc-preview-stage canvas { display: block; max-width: none; margin: 0 auto; background: #fff; box-shadow: 0 1px 6px #18304733; }
.ttc-preview-footer { padding: 9px 16px; font-size: 12px; line-height: 1.4; }
.ttc-preview-footer p { margin: 0; }
#drawing-preview-status:empty { display: none; }
#drawing-preview-status[data-error="true"] { color: #8b3025; margin-bottom: 8px; }
#drawing-preview-help { color: #526577; }
#drawing-preview-retry { margin: 0 0 8px; }
.ttc-page :is(select):focus-visible { outline: 3px solid #ba702f; outline-offset: 3px; }
@media (max-width: 520px) {
  .ttc-preview-heading { padding: 10px; }
  .ttc-preview-controls { padding: 0 10px 10px; gap: 6px; }
  .ttc-preview-controls label { margin-left: 0; }
  .ttc-preview-footer { padding: 8px 10px; }
}
@media (max-width: 1000px) { .ttc-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ttc-transfer-workspace { grid-template-columns: minmax(0, 1fr) 78px minmax(0, 1fr); gap: 8px; } .ttc-pane-heading { padding: 12px; } .ttc-pane-heading h2 { font-size: 17px; } }
@media (max-width: 760px) {
  .ttc-transfer-workspace, .ttc-export-layout { grid-template-columns: 1fr; }
  .ttc-transfer-controls { flex-direction: row; justify-content: center; padding: 4px 0; }
  .ttc-transfer-controls .ttc-button { width: 145px; flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .ttc-arrow { transform: rotate(90deg); }
  .ttc-pane { height: 540px; }
  .ttc-page { padding-bottom: 80px; }
  .ttc-mobile-jump { display: block; position: fixed; bottom: 12px; right: 16px; z-index: 20; background: #1c536d; color: #fff; padding: 14px 20px; border-radius: 8px; box-shadow: 0 3px 14px #132e4733; font: 700 14px Arial,sans-serif; text-decoration: none; }
  .ttc-mobile-back { display: block; margin-top: 18px; font-size: 14px; }
}
@media (max-width: 520px) { .ttc-page { padding: 12px 12px 80px; } .ttc-heading, .ttc-filter-panel, .ttc-export-panel { padding: 18px; } .ttc-source-line { font-size: 12px; } .ttc-filters { grid-template-columns: 1fr; } .ttc-filter-heading { align-items: start; } .ttc-toolbar h2 { font-size: 18px; } .ttc-pane-scroll { padding: 10px; } .ttc-result { padding: 13px; } }
