/* ==========================================================================
   Developers Web Tools — tools.css
   Shared styles for tool pages built on tool-kit.js (load after style.css).
   ========================================================================== */

.ty-tool [hidden] { display: none !important; }

/* Workspace grid that never overflows on long unbroken strings (Base64, JWT…) */
.ty-tool .tool-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 460px; background: var(--line); gap: 1px; }
@media (max-width: 860px) { .ty-tool .tool-grid { grid-template-columns: 1fr; } }
.ty-tool .tool-grid.single { grid-template-columns: 1fr; }
.ty-tool .tool-pane { min-width: 0; overflow: hidden; }
.ty-tool .tool-pane-header { gap: 10px; min-width: 0; flex-wrap: wrap; }
.ty-tool .tool-pane-header .title { white-space: nowrap; }
.ty-tool .tool-pane-header .actions { display: flex; gap: 6px; flex-wrap: wrap; }

.ty-tool .tool-textarea {
  min-height: 360px; white-space: pre-wrap; word-break: break-all; overflow-wrap: anywhere; box-sizing: border-box;
}
.ty-tool .tool-textarea[readonly] { cursor: text; }
.ty-tool .tool-textarea.is-empty::placeholder { font-style: italic; }
.ty-tool .ty-mono { font-family: 'IBM Plex Mono', monospace; }

/* Toolbar controls */
.ty-tool .tool-toolbar { align-items: center; }
.ty-tool .tool-toolbar-left { gap: 14px; }
.ty-opt { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; color: var(--ink); cursor: pointer; user-select: none; white-space: nowrap; }
.ty-opt input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--amber); cursor: pointer; margin: 0; }
.ty-opt .hint { color: var(--ink-soft); font-size: 12px; }
.ty-sep { width: 1px; align-self: stretch; background: var(--line); min-height: 24px; }

.ty-seg { display: inline-flex; padding: 3px; border-radius: 9px; background: var(--paper-2); border: 1px solid var(--line); gap: 2px; }
.ty-seg button {
  border: none; background: none; padding: 7px 12px; border-radius: 7px; cursor: pointer; font: inherit;
  font-size: 12.5px; font-weight: 600; color: var(--ink-soft); font-family: 'IBM Plex Mono', monospace; white-space: nowrap;
}
.ty-seg button:hover { color: var(--ink); }
.ty-seg button.active { background: var(--amber); color: #241601; }
.ty-seg button:focus-visible, .ty-opt input:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

/* Alerts / status line */
.ty-alert { margin: 0; padding: 10px 16px; font-size: 13px; line-height: 1.5; border-top: 1px solid var(--line); background: var(--paper); color: var(--ink-soft); }
.ty-alert[hidden] { display: none; }
.ty-alert-ok { color: #1E8058; background: rgba(47,174,122,0.08); }
.ty-alert-error { color: var(--error); background: rgba(229,72,77,0.07); }
.ty-alert-warn { color: var(--amber-ink); background: rgba(240,169,59,0.10); }
[data-theme="dark"] .ty-alert-ok { color: #4FD79A; }
[data-theme="dark"] .ty-alert-warn { color: var(--amber); }
.ty-note { padding: 8px 16px; font-size: 12px; font-family: 'IBM Plex Mono', monospace; color: var(--amber-ink); background: rgba(240,169,59,0.08); border-top: 1px solid var(--line); }
[data-theme="dark"] .ty-note { color: var(--amber); }
.ty-note[hidden] { display: none; }

/* Pair link ("Need to decode instead?") */
.ty-pair { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; font-size: 13.5px; color: var(--ink-soft); }
.ty-pair a { font-family: 'IBM Plex Mono', monospace; font-weight: 600; font-size: 12.5px; color: var(--amber-ink); border-bottom: 1.5px solid currentColor; }
[data-theme="dark"] .ty-pair a { color: var(--amber); }
.ty-kbd { font-family: 'IBM Plex Mono', monospace; font-size: 11px; padding: 1px 6px; border: 1px solid var(--line); border-radius: 5px; background: var(--paper); }

/* File drop zone */
.ty-drop {
  flex: 1; min-height: 360px; margin: 16px; border: 2px dashed var(--line); border-radius: 12px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 24px; color: var(--ink-soft); background: var(--editor-bg);
  transition: border-color .15s, background .15s;
}
.ty-drop.is-drag { border-color: var(--amber); background: rgba(240,169,59,0.06); }
.ty-drop .big { font-size: 30px; }
.ty-drop strong { color: var(--ink); font-size: 15px; }
.ty-drop .file-meta { font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; color: var(--ink); word-break: break-all; }
.ty-drop label.btn { cursor: pointer; }
.ty-drop input[type="file"] { display: none; }

/* Binary / image preview panel */
.ty-binary { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; text-align: center; background: var(--editor-bg); min-height: 360px; }
.ty-binary[hidden] { display: none; }
.ty-binary img { min-height: 96px; image-rendering: pixelated; max-width: 100%; max-height: 260px; border-radius: 8px; border: 1px solid var(--line); background: repeating-conic-gradient(#e9e9f0 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.ty-binary .meta { font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; color: var(--ink-soft); }

/* JWT */
.ty-jwt-token {
  flex: 1; min-height: 360px; padding: 18px; margin: 0; background: var(--editor-bg); font-family: 'IBM Plex Mono', monospace;
  font-size: 13.5px; line-height: 1.7; white-space: pre-wrap; word-break: break-all; overflow-wrap: anywhere; outline: none; color: var(--ink);
}
.jwt-h { color: #E5484D; } .jwt-p { color: #8E4EC6; } .jwt-s { color: #0091FF; } .jwt-dot { color: var(--ink); font-weight: 700; }
[data-theme="dark"] .jwt-h { color: #FF6369; } [data-theme="dark"] .jwt-p { color: #BF7AF0; } [data-theme="dark"] .jwt-s { color: #52A9FF; }
.ty-jwt-out { display: flex; flex-direction: column; min-height: 360px; background: var(--editor-bg); overflow: auto; }
.ty-jwt-block { border-bottom: 1px solid var(--line); padding: 0; margin: 0; }
.ty-jwt-block > .bh { display: flex; align-items: center; justify-content: space-between; padding: 9px 16px; background: var(--paper); font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.ty-jwt-block > .bh .lbl::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: 0; background: currentColor; }
.ty-jwt-block.h > .bh .lbl { color: #E5484D; } .ty-jwt-block.p > .bh .lbl { color: #8E4EC6; } .ty-jwt-block.s > .bh .lbl { color: #0091FF; }
.ty-jwt-block pre { margin: 0; padding: 14px 16px; font-family: 'IBM Plex Mono', monospace; font-size: 13px; line-height: 1.6; white-space: pre-wrap; word-break: break-all; color: var(--ink); }
.ty-jwt-empty { flex: 1; display: flex; align-items: center; justify-content: center; color: var(--ink-soft); font-style: italic; font-size: 14px; padding: 24px; text-align: center; }

.ty-banner { display: flex; align-items: center; gap: 10px; padding: 12px 16px; font-size: 13.5px; font-weight: 600; border-bottom: 1px solid var(--line); }
.ty-banner .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.ty-banner.ok { color: #1E8058; background: rgba(47,174,122,0.08); }
.ty-banner.bad { color: var(--error); background: rgba(229,72,77,0.07); }
.ty-banner.warn { color: var(--amber-ink); background: rgba(240,169,59,0.10); }
[data-theme="dark"] .ty-banner.ok { color: #4FD79A; } [data-theme="dark"] .ty-banner.warn { color: var(--amber); }

.ty-claims { width: 100%; border-collapse: collapse; font-size: 13px; }
.ty-claims th, .ty-claims td { text-align: left; padding: 9px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ty-claims th { font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; color: var(--ink); white-space: nowrap; width: 1%; }
.ty-claims td { color: var(--ink-soft); word-break: break-word; }
.ty-claims td .v { font-family: 'IBM Plex Mono', monospace; color: var(--ink); font-size: 12.5px; word-break: break-all; }
.ty-claims td .d { display: block; font-size: 12px; margin-top: 2px; }

/* Reference table in content sections */
.ty-ref-table { width: 100%; border-collapse: collapse; background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: 13.5px; }
.ty-ref-table th, .ty-ref-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.ty-ref-table th { background: var(--paper); font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.ty-ref-table td code, .ty-tool .rule-card code, .ty-tool .about-grid code, .ty-tool .faq-a code {
  font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; background: var(--paper); border: 1px solid var(--line); padding: 1px 5px; border-radius: 4px; color: var(--ink);
}
.ty-ref-wrap { overflow-x: auto; }

/* Content section helpers (same look as existing tools, without inline styles) */
.ty-sec { padding: 56px 0; border-top: 1px solid var(--line); background: var(--paper-2); }
.ty-sec.alt { background: var(--paper); }
.ty-sec .eyebrow { margin-bottom: 12px; }
.ty-sec h2 { font-size: 26px; margin: 0 0 6px; }
.ty-sec .sub { color: var(--ink-soft); font-size: 14.5px; margin: 0 0 30px; }
.ty-tool .about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; font-size: 14.5px; line-height: 1.7; color: var(--ink-soft); }
.ty-tool .about-grid p { margin: 0 0 12px; }
.ty-tool .rules-list { display: flex; flex-direction: column; gap: 14px; }
.ty-tool .rule-card { display: flex; align-items: flex-start; gap: 16px; padding: 20px 22px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px; }
.ty-sec.alt .rule-card { background: var(--paper-2); }
.ty-tool .rule-icon { width: 36px; height: 36px; border-radius: 8px; background: rgba(240,169,59,0.14); color: var(--amber-ink); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; flex-shrink: 0; font-family: 'IBM Plex Mono', monospace; }
[data-theme="dark"] .ty-tool .rule-icon, [data-theme="dark"] .ty-tool .why-ico { color: var(--amber); }
.ty-tool .rule-card h3 { font-size: 15.5px; margin: 0 0 6px; color: var(--ink); }
.ty-tool .rule-card p { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--ink-soft); }
.ty-tool .why-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--line); gap: 1px; }
.ty-tool .why-grid > div { background: var(--paper-2); padding: 26px 22px; }
.ty-tool .why-ico { width: 32px; height: 32px; border-radius: 8px; background: rgba(240,169,59,0.14); color: var(--amber-ink); display: flex; align-items: center; justify-content: center; font-size: 14px; margin-bottom: 14px; font-weight: 700; }
.ty-tool .why-grid h3 { font-size: 15px; margin: 0 0 6px; color: var(--ink); }
.ty-tool .why-grid p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--ink-soft); }
.ty-tool .how-sec { padding: 64px 0; background: var(--navy-900); }
.ty-tool .how-sec h2 { font-size: 26px; color: #fff; margin: 0 0 6px; }
.ty-tool .how-sec .sub { color: #9096B8; font-size: 14.5px; margin: 0 0 32px; }
.ty-tool .how-sec .eyebrow { background: rgba(240,169,59,0.18); color: var(--amber); margin-bottom: 12px; }
.ty-tool .faq { max-width: 860px; margin: 0 auto; }
.ty-tool .faq-item.open .faq-a { max-height: 600px; }
@media (max-width: 860px) {
  .ty-tool .about-grid { grid-template-columns: 1fr; gap: 12px; }
  .ty-tool .why-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .ty-tool .why-grid { grid-template-columns: 1fr; }
  .ty-tool .tool-toolbar { padding: 12px; }
  .ty-tool .tool-intro h1 { font-size: 30px; }
}

/* Mobile: textareas shouldn't be taller than the screen */
@media (max-width: 860px) { .ty-tool .tool-textarea, .ty-drop, .ty-binary, .ty-jwt-token, .ty-jwt-out { min-height: 240px; } }

/* ==========================================================================
   Batch 2 — counters, forms, previews
   ========================================================================== */
.ty-scroll { flex: 1; overflow: auto; background: var(--editor-bg); min-height: 360px; }
.ty-statgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border-bottom: 1px solid var(--line); }
.ty-statgrid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ty-stat { background: var(--editor-bg); padding: 14px 16px; min-width: 0; }
.ty-stat b { display: block; font-family: 'Space Grotesk', sans-serif; font-size: 24px; line-height: 1.15; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ty-stat span { display: block; font-size: 11.5px; color: var(--ink-soft); margin-top: 3px; font-family: 'IBM Plex Mono', monospace; text-transform: uppercase; letter-spacing: .05em; }
.ty-stat.hl b { color: var(--amber-ink); }
[data-theme="dark"] .ty-stat.hl b { color: var(--amber); }
@media (max-width: 560px) { .ty-statgrid, .ty-statgrid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ty-stat b { font-size: 20px; } }

.ty-subhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 16px; background: var(--paper); border-bottom: 1px solid var(--line);
  font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.ty-subhead .ty-seg button { padding: 4px 9px; font-size: 11px; text-transform: none; letter-spacing: 0; }
.ty-subhead .ty-opt { text-transform: none; letter-spacing: 0; font-family: Inter, sans-serif; font-weight: 500; font-size: 12.5px; }

.ty-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ty-table th, .ty-table td { padding: 8px 16px; border-bottom: 1px solid var(--line); text-align: left; }
.ty-table th { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.ty-table td { color: var(--ink); }
.ty-table td.num, .ty-table th.num { text-align: right; font-family: 'IBM Plex Mono', monospace; white-space: nowrap; }
.ty-table td.kw { word-break: break-word; }
.ty-table .bar { display: inline-block; height: 6px; border-radius: 3px; background: var(--amber); vertical-align: middle; margin-right: 8px; min-width: 2px; }
.ty-empty { padding: 22px 16px; color: var(--ink-soft); font-style: italic; font-size: 13.5px; text-align: center; }

/* Limit meters */
.ty-limits { padding: 6px 0; }
.ty-limit { padding: 9px 16px; }
.ty-limit .row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin-bottom: 6px; color: var(--ink); }
.ty-limit .row .n { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--ink-soft); white-space: nowrap; }
.ty-limit .row .n b { color: var(--ink); font-weight: 600; }
.ty-meter { height: 6px; border-radius: 3px; background: var(--paper); border: 1px solid var(--line); overflow: hidden; }
.ty-meter > i { display: block; height: 100%; width: 0; background: #2FAE7A; transition: width .15s; }
.ty-meter.warn > i { background: var(--amber); }
.ty-meter.over > i { background: var(--error); }
.ty-limit.over .row .n b { color: var(--error); }
.ty-limit input[type="number"] { width: 90px; }

/* Forms */
.ty-form { flex: 1; padding: 18px; display: flex; flex-direction: column; gap: 16px; background: var(--editor-bg); overflow: auto; min-height: 360px; }
.ty-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ty-field > label, .ty-field > .lbl { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13px; font-weight: 600; color: var(--ink); }
.ty-field > label .cnt { font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; font-weight: 500; color: var(--ink-soft); white-space: nowrap; }
.ty-field > label .cnt.ok { color: #1E8058; } .ty-field > label .cnt.warn { color: var(--amber-ink); } .ty-field > label .cnt.over { color: var(--error); }
[data-theme="dark"] .ty-field > label .cnt.ok { color: #4FD79A; } [data-theme="dark"] .ty-field > label .cnt.warn { color: var(--amber); }
.ty-field .opt { font-weight: 400; color: var(--ink-soft); font-size: 12px; }
.ty-input, .ty-tool .tool-select {
  width: 100%; box-sizing: border-box; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper-2);
  color: var(--ink); font: inherit; font-size: 14px; outline: none; transition: border-color .15s;
}
.ty-input:focus, .ty-tool .tool-select:focus { border-color: var(--amber); }
textarea.ty-input { resize: vertical; min-height: 70px; line-height: 1.5; }
.ty-input[type="color"] { padding: 3px; height: 38px; width: 64px; cursor: pointer; }
.ty-field .hint { font-size: 12px; color: var(--ink-soft); line-height: 1.45; }
.ty-field .hint.warn { color: var(--amber-ink); } [data-theme="dark"] .ty-field .hint.warn { color: var(--amber); }
.ty-field .hint.error { color: var(--error); }
.ty-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.ty-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ty-checks { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.ty-fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 14px; margin: 0; min-width: 0; }
.ty-fieldset legend { padding: 0 6px; font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
@media (max-width: 560px) { .ty-row, .ty-row.three { grid-template-columns: 1fr; } }

/* Code output (generators) */
.ty-code { flex: 0 0 auto; min-height: 220px; margin: 0; padding: 16px 18px; background: var(--editor-bg); font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; line-height: 1.65;
  white-space: pre-wrap; word-break: break-all; color: var(--ink); border: none; resize: vertical; width: 100%; box-sizing: border-box; outline: none; }
.ty-preview-wrap { padding: 18px; background: var(--paper); border-top: 1px solid var(--line); flex: 1; }
.ty-checklist { list-style: none; margin: 0; padding: 12px 16px; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; border-top: 1px solid var(--line); background: var(--editor-bg); }
.ty-checklist li { display: flex; gap: 8px; align-items: flex-start; color: var(--ink-soft); line-height: 1.45; }
.ty-checklist li::before { content: "✓"; color: #2FAE7A; font-weight: 700; flex: 0 0 auto; }
.ty-checklist li.warn::before { content: "!"; color: var(--amber-ink); }
.ty-checklist li.error::before { content: "✕"; color: var(--error); }

/* Google SERP preview (always light, like Google) */
.ty-serp { background: #fff; border: 1px solid #DADCE0; border-radius: 12px; padding: 16px 18px; font-family: Arial, sans-serif; max-width: 640px; color: #202124; }
.ty-serp .site { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.ty-serp .fav { width: 26px; height: 26px; border-radius: 50%; background: #F1F3F4; border: 1px solid #DADCE0; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #5F6368; flex: 0 0 auto; }
.ty-serp .sname { font-size: 14px; color: #202124; line-height: 1.3; }
.ty-serp .surl { font-size: 12px; color: #4D5156; line-height: 1.3; word-break: break-all; }
.ty-serp .stitle { font-family: Arial, sans-serif; font-size: 20px; line-height: 1.3; color: #1A0DAB; margin: 0 0 4px; font-weight: 400; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ty-serp .sdesc { font-family: Arial, sans-serif; font-size: 14px; line-height: 1.58; color: #4D5156; overflow-wrap: anywhere; }
.ty-serp.mobile { max-width: 380px; }
.ty-serp.mobile .stitle { font-size: 18px; }

/* Social card previews */
.ty-tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.ty-og { max-width: 520px; border: 1px solid #DADDE1; border-radius: 0; overflow: hidden; background: #F0F2F5; font-family: Helvetica, Arial, sans-serif; color: #1C1E21; }
.ty-og .img { aspect-ratio: 1.91 / 1; background: #E4E6EB center / cover no-repeat; display: flex; align-items: center; justify-content: center; color: #8A8D91; font-size: 13px; overflow: hidden; }
.ty-og .img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ty-og .meta { padding: 10px 12px; border-top: 1px solid #DADDE1; }
.ty-og .dom { font-size: 12px; text-transform: uppercase; color: #606770; letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ty-og .t { font-size: 16px; font-weight: 600; line-height: 1.3; margin: 3px 0 2px; color: #1D2129; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.ty-og .d { font-size: 14px; color: #606770; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.ty-og.x { border-radius: 16px; background: #fff; border-color: #CFD9DE; position: relative; }
.ty-og.x .meta { display: none; }
.ty-og.x .xcap { position: absolute; left: 12px; bottom: 12px; background: rgba(0,0,0,.77); color: #fff; font-size: 13px; padding: 2px 6px; border-radius: 4px; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ty-og.x .xdom { padding: 6px 2px 0; font-size: 13px; color: #536471; }
.ty-og.x.summary { display: flex; border-radius: 16px; }
.ty-og.x.summary .img { aspect-ratio: 1 / 1; width: 130px; flex: 0 0 130px; border-right: 1px solid #CFD9DE; }
.ty-og.x.summary .meta { display: block; border-top: none; background: #fff; display: flex; flex-direction: column; justify-content: center; }
.ty-og.x.summary .xcap { display: none; }
.ty-og.li { background: #fff; border-radius: 8px; }
.ty-og.li .meta { background: #fff; }
.ty-og.li .t { font-size: 14px; }
.ty-og.li .d { display: none; }

/* Case converter buttons */
.ty-cases { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--paper); }
.ty-cases button { border: 1px solid var(--line); background: var(--paper-2); color: var(--ink); border-radius: 7px; padding: 6px 11px; font: inherit; font-size: 12.5px; cursor: pointer; font-family: 'IBM Plex Mono', monospace; white-space: nowrap; }
.ty-cases button:hover { border-color: var(--amber); }
.ty-cases button.active { background: var(--amber); border-color: var(--amber); color: #241601; font-weight: 600; }
.ty-cases button:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

/* Word goal */
.ty-goal { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--ink-soft); }
.ty-goal .ty-meter { flex: 1; }
.ty-goal input { width: 90px; padding: 5px 8px; font-size: 13px; }

/* ===================== Batch 4 — JSON tools ===================== */
.ty-jres { flex: 1; overflow: auto; background: var(--editor-bg); min-height: 360px; }
.ty-jerr { margin: 16px; border: 1px solid color-mix(in srgb, var(--error) 45%, var(--line)); border-radius: 12px; background: color-mix(in srgb, var(--error) 7%, var(--paper-2)); overflow: hidden; }
.ty-jerr .head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 14px 4px; }
.ty-jerr .head b { color: var(--error); font-family: 'Space Grotesk', sans-serif; font-size: 16px; }
.ty-jerr .loc { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--ink-soft); }
.ty-jerr .msg { padding: 0 14px 10px; font-weight: 600; color: var(--ink); font-size: 14px; }
.ty-jerr pre { margin: 0; padding: 10px 14px; background: var(--editor-bg); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; line-height: 1.55; overflow-x: auto; white-space: pre; color: var(--ink); }
.ty-jerr pre .jcaret { color: var(--error); font-weight: 700; }
.ty-jerr .hint { padding: 10px 14px; font-size: 13px; color: var(--ink-soft); line-height: 1.5; }
.ty-jerr .acts { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 14px 12px; }
.ty-jok { margin: 16px; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; border: 1px solid color-mix(in srgb, #2FAE7A 45%, var(--line)); background: color-mix(in srgb, #2FAE7A 8%, var(--paper-2)); }
.ty-jok .big { width: 34px; height: 34px; border-radius: 50%; background: #2FAE7A; color: #fff; display: grid; place-items: center; font-size: 18px; font-weight: 700; flex: 0 0 auto; }
.ty-jok b { display: block; font-family: 'Space Grotesk', sans-serif; font-size: 17px; color: var(--ink); }
.ty-jok span { font-size: 12.5px; color: var(--ink-soft); }
.ty-jwarn { margin: 0 16px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper-2); }
.ty-jwarn h4 { margin: 0; padding: 10px 14px; font-size: 13px; color: var(--amber-ink); border-bottom: 1px solid var(--line); }
[data-theme="dark"] .ty-jwarn h4 { color: var(--amber); }
.ty-jwarn ul { margin: 0; padding: 8px 14px 10px 32px; font-size: 12.5px; color: var(--ink-soft); line-height: 1.6; }
.ty-jwarn code { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--ink); }
.ty-jres .ty-statgrid { margin: 0 16px 16px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ty-dop { display: inline-block; min-width: 68px; text-align: center; padding: 2px 8px; border-radius: 999px; font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.ty-dop.added { background: color-mix(in srgb, #2FAE7A 18%, transparent); color: #1E8058; }
.ty-dop.removed { background: color-mix(in srgb, var(--error) 16%, transparent); color: var(--error); }
.ty-dop.changed { background: color-mix(in srgb, var(--amber) 22%, transparent); color: var(--amber-ink); }
[data-theme="dark"] .ty-dop.added { color: #4FD79A; } [data-theme="dark"] .ty-dop.changed { color: var(--amber); }
.ty-dtable { width: 100%; border-collapse: collapse; font-size: 12.5px; table-layout: fixed; }
.ty-dtable th, .ty-dtable td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.ty-dtable th { background: var(--paper-2); font-family: 'IBM Plex Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); position: sticky; top: 0; z-index: 1; }
.ty-dtable td.p, .ty-dtable td.v { font-family: 'IBM Plex Mono', monospace; word-break: break-word; overflow-wrap: anywhere; }
.ty-dtable td.v.a { color: var(--error); } .ty-dtable td.v.b { color: #1E8058; }
[data-theme="dark"] .ty-dtable td.v.b { color: #4FD79A; }
.ty-dsum { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--paper-2); }
.ty-dsum .same { font-weight: 600; color: #1E8058; } [data-theme="dark"] .ty-dsum .same { color: #4FD79A; }
.ty-dbody { max-height: 560px; overflow: auto; background: var(--editor-bg); }
.ty-full { border-top: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
@media (max-width: 700px) { .ty-dtable col.cv { width: auto !important; } .ty-dtable { font-size: 12px; } .ty-dtable th, .ty-dtable td { padding: 7px 8px; } }

/* ==========================================================================
   VISUAL CSS GENERATORS (.ty-gen) — gradient, box-shadow, border-radius, glass, clamp()
   Desktop: controls (left, full height, scroll inside) | preview (top right) + CSS (bottom right).
   Phones: preview (sticks under the header while you scroll the controls) → controls → CSS.
   ========================================================================== */
.tool-workspace.ty-gen-ws { overflow: hidden; overflow: clip; }   /* clip (not hidden) so the phone preview can be sticky */
.tool-workspace .tool-grid.ty-gen {
  grid-template-columns: minmax(330px, 0.85fr) minmax(0, 1.15fr);
  grid-template-rows: minmax(0, 1.55fr) minmax(0, 1fr);
  height: var(--ty-ed-h); min-height: 560px;
}
.ty-gen > .ty-gen-main { display: contents; }
.ty-gen .ty-gen-ctl { grid-column: 1; grid-row: 1 / span 2; }
.ty-gen .ty-gen-prev { grid-column: 2; grid-row: 1; }
.ty-gen > .ty-gen-code { grid-column: 2; grid-row: 2; }
.ty-gen .tool-pane { min-height: 0; min-width: 0; overflow: hidden; }
.ty-gen .tool-pane > * { flex: 0 0 auto; }
.ty-gen .tool-pane > .tool-pane-header { min-height: 57px; box-sizing: border-box; flex-wrap: wrap; gap: 8px; row-gap: 6px; }
.ty-gen .tool-pane > .tool-pane-header .ty-seg { padding: 2px; }
.ty-gen .tool-pane > .tool-pane-header .ty-seg button { padding: 4px 10px; line-height: 18px; }

/* controls */
.ty-gen .ty-ctl { flex: 1 1 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px 18px 22px;
  display: flex; flex-direction: column; gap: 14px; background: var(--editor-bg); }
.ty-ctl .ty-group { display: flex; flex-direction: column; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.ty-ctl .ty-group:first-child { padding-top: 0; border-top: 0; }
.ty-ctl .ty-group > h3 { margin: 0; font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-soft); }
.ty-ctl .ty-line { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.ty-ctl .ty-seg { flex-wrap: wrap; max-width: 100%; }
.ty-ctl .ty-opt { white-space: normal; align-items: flex-start; }
.ty-ctl .ty-opt input[type="checkbox"] { margin-top: 1px; flex: 0 0 auto; }
.ty-ctl .ty-line > .lbl { font-size: 13px; font-weight: 600; color: var(--ink); min-width: 84px; }
.ty-slider { display: grid; grid-template-columns: minmax(84px, 118px) minmax(0, 1fr) 78px; align-items: center; gap: 10px; }
.ty-slider > label { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ty-slider > label small { font-weight: 400; color: var(--ink-soft); font-size: 11.5px; }
.ty-slider input[type="range"], .ty-range { width: 100%; height: 28px; margin: 0; accent-color: var(--amber); cursor: pointer; background: transparent; }
.ty-num { width: 100%; box-sizing: border-box; padding: 6px 8px; border-radius: 7px; border: 1px solid var(--line); background: var(--paper-2); color: var(--ink);
  font-family: 'IBM Plex Mono', monospace; font-size: 13px; text-align: right; outline: none; -moz-appearance: textfield; }
.ty-num::-webkit-inner-spin-button, .ty-num::-webkit-outer-spin-button { opacity: .5; }
.ty-num:focus, .ty-hex:focus { border-color: var(--amber); }
.ty-hex { width: 96px; box-sizing: border-box; padding: 6px 8px; border-radius: 7px; border: 1px solid var(--line); background: var(--paper-2); color: var(--ink);
  font-family: 'IBM Plex Mono', monospace; font-size: 13px; outline: none; text-transform: lowercase; }
.ty-hex.bad { border-color: var(--error); }
.ty-swatch { width: 40px; height: 34px; padding: 2px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper-2); cursor: pointer; flex: 0 0 auto; }
.ty-swatch::-webkit-color-swatch-wrapper { padding: 0; } .ty-swatch::-webkit-color-swatch { border: 0; border-radius: 5px; }
.ty-swatch::-moz-color-swatch { border: 0; border-radius: 5px; }
.ty-color { display: flex; align-items: center; gap: 8px; }

/* chips (layers / presets) */
.ty-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ty-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper-2);
  color: var(--ink); font: 500 12.5px Inter, sans-serif; cursor: pointer; line-height: 18px; }
.ty-chip:hover { border-color: var(--amber); }
.ty-chip[aria-pressed="true"] { background: var(--amber); border-color: var(--amber); color: #241601; }
.ty-chip:focus-visible, .ty-preset:focus-visible, .ty-stop:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.ty-chip.add { border-style: dashed; color: var(--ink-soft); }
.ty-presets { display: flex; flex-wrap: wrap; gap: 8px; }
.ty-preset { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; padding: 0; background: var(--paper-2); }
.ty-preset.wide { width: auto; height: auto; padding: 7px 12px; font: 500 12.5px Inter, sans-serif; color: var(--ink); border-radius: 999px; }
.ty-preset.wide:hover { border-color: var(--amber); }

/* preview stage */
.ty-gen .ty-stage { flex: 1 1 0; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; padding: 28px; overflow: auto; background: #F4F5F7; }
.ty-stage[data-bg="checker"] { background-color: #fff; background-image: conic-gradient(#E4E6EA 25%, transparent 0 50%, #E4E6EA 0 75%, transparent 0); background-size: 20px 20px; }
.ty-stage[data-bg="light"] { background: #F4F5F7; }
.ty-stage[data-bg="white"] { background: #FFFFFF; }
.ty-stage[data-bg="dark"] { background: #15181D; }
.ty-stage .ty-subject { flex: 0 0 auto; max-width: 100%; max-height: 100%; box-sizing: border-box; }
.ty-stage-note { position: absolute; left: 10px; bottom: 8px; font: 500 11px 'IBM Plex Mono', monospace; color: #5b6270; background: rgba(255,255,255,.75); padding: 2px 7px; border-radius: 6px; pointer-events: none; }
.ty-stage[data-bg="dark"] .ty-stage-note { color: #c9ced8; background: rgba(0,0,0,.45); }

/* gradient stop bar */
.ty-gbar { position: relative; height: 34px; border-radius: 8px; border: 1px solid var(--line); cursor: copy; touch-action: none;
  background-image: conic-gradient(#E4E6EA 25%, transparent 0 50%, #E4E6EA 0 75%, transparent 0); background-size: 12px 12px; background-color: #fff; margin: 4px 11px 18px; }
.ty-gbar > .fill { position: absolute; inset: 0; border-radius: 7px; pointer-events: none; }
.ty-stop { position: absolute; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 3px solid #fff; padding: 0;
  box-shadow: 0 0 0 1px rgba(0,0,0,.45), 0 2px 6px rgba(0,0,0,.3); cursor: grab; touch-action: none; }
.ty-stop[aria-pressed="true"] { width: 26px; height: 26px; margin: -13px 0 0 -13px; box-shadow: 0 0 0 2px var(--amber), 0 2px 8px rgba(0,0,0,.35); z-index: 2; }
.ty-stop:active { cursor: grabbing; }

/* result table (clamp) */
.ty-gen .ty-ptable { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ty-gen .ty-ptable th, .ty-gen .ty-ptable td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: right; font-family: 'IBM Plex Mono', monospace; white-space: nowrap; }
.ty-gen .ty-ptable th:first-child, .ty-gen .ty-ptable td:first-child { text-align: left; }
.ty-gen .ty-ptable th { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); font-weight: 600; }
.ty-gen .ty-ptable tr.cur td { color: var(--amber-ink); font-weight: 600; }
[data-theme="dark"] .ty-gen .ty-ptable tr.cur td { color: var(--amber); }
.ty-tips { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; line-height: 1.45; color: var(--ink-soft); }
.ty-tips li { display: flex; gap: 8px; } .ty-tips li::before { content: "✓"; color: #2FAE7A; font-weight: 700; }
.ty-tips li.warn::before { content: "!"; color: var(--amber-ink); } .ty-tips li.warn { color: var(--ink); }

/* CSS output box: wraps by default, Wrap toggle from layout.js, scrolls inside */
.tool-workspace .tool-grid.ty-gen > .ty-gen-code > textarea.tool-textarea {
  flex: 1 1 0; height: auto; min-height: 0; max-height: none; resize: none; overflow-y: auto; overflow-x: hidden;
  white-space: pre-wrap; word-break: normal; overflow-wrap: break-word; overflow-wrap: anywhere; line-height: 22px; font-size: 13px;
}
.tool-workspace .tool-grid.ty-gen > .ty-gen-code > textarea.tool-textarea.ty-nowrap { white-space: pre; overflow-wrap: normal; overflow-x: auto; }
.tool-workspace .tool-grid.ty-gen [data-ty-scroll]:focus-visible { outline: 2px solid var(--amber); outline-offset: -2px; }

@media (max-width: 860px) {
  .tool-workspace .tool-grid.ty-gen { grid-template-columns: 1fr; grid-template-rows: none; height: auto; min-height: 0; }
  .ty-gen > .ty-gen-main { display: flex; flex-direction: column; gap: 1px; background: var(--line); min-width: 0; }
  .ty-gen .ty-gen-ctl, .ty-gen .ty-gen-prev, .ty-gen > .ty-gen-code { grid-column: auto; grid-row: auto; }
  /* preview first and sticky under the site header while the controls scroll past */
  .ty-gen .ty-gen-prev { order: -1; position: sticky; top: var(--ty-head-h, 67px); z-index: 6; box-shadow: 0 6px 14px -8px rgba(0,0,0,.35); }
  .ty-gen .ty-gen-prev > .tool-pane-header { min-height: 0; padding-top: 6px; padding-bottom: 6px; }
  .ty-gen .ty-stage { flex: 0 0 auto; height: clamp(140px, 26vh, 230px); padding: 14px; }
  .ty-gen .ty-ctl { flex: 0 0 auto; overflow: visible; }
  .tool-workspace .tool-grid.ty-gen > .ty-gen-code > textarea.tool-textarea { flex: 0 0 auto; height: clamp(150px, 30vh, 280px); }
}
@supports (height: 100dvh) { @media (max-width: 860px) { .ty-gen .ty-stage { height: clamp(140px, 26dvh, 230px); } } }
@media (max-width: 480px) {
  .ty-slider { grid-template-columns: minmax(0, 1fr) 74px; row-gap: 2px; }
  .ty-slider > label { grid-column: 1 / -1; }
  .ty-slider input[type="range"] { height: 32px; }
  .ty-gen .ty-ctl { padding: 14px 14px 18px; }
}
@media (prefers-reduced-motion: reduce) { .ty-gen * { transition: none !important; } }

/* the hidden attribute must always win over component display rules */
.ty-tool [hidden] { display: none !important; }

/* ==========================================================================
   Batch 6 — Text tools (line tools, Find & Replace, Text Diff Checker)
   ========================================================================== */
/* option rows wrap cleanly on narrow screens */
.ty-txtopts { flex-wrap: wrap; row-gap: 8px; }
.ty-txtopts .ty-opt input:disabled { cursor: not-allowed; }
.ty-seg button:disabled { cursor: not-allowed; }

/* Find & Replace fields */
.ty-frbar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: end; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--paper); }
.ty-frfield { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ty-frfield > span { font-family: 'IBM Plex Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.ty-frfield > input { width: 100%; box-sizing: border-box; font-size: 14px; }
.ty-frswap { margin-bottom: 3px; }
@media (max-width: 600px) {
  .ty-frbar { grid-template-columns: minmax(0, 1fr) auto; }
  .ty-frbar > .ty-frfield:last-child { grid-column: 1 / -1; }
  .ty-frswap { order: 0; }
}

/* Text Diff Checker: shorter inputs, the result gets the screen */
.tool-workspace.ty-diff-ws .tool-grid.ty-ed { height: clamp(240px, 38vh, 440px); min-height: 240px; }
@supports (height: 100dvh) { .tool-workspace.ty-diff-ws .tool-grid.ty-ed { height: clamp(240px, 38dvh, 440px); } }
@media (max-width: 860px) {
  .tool-workspace.ty-diff-ws .tool-grid.ty-ed { height: auto; min-height: 0; }
  .tool-workspace.ty-diff-ws .tool-grid.ty-ed > .tool-pane > textarea.tool-textarea { height: clamp(150px, 28vh, 300px); }
}
.ty-dsumtxt { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; }
.ty-diffbody { max-height: clamp(360px, calc(100vh - 180px), 1100px); overflow: auto; }
@supports (height: 100dvh) { .ty-diffbody { max-height: clamp(360px, calc(100dvh - 180px), 1100px); } }

.ty-difft { width: 100%; border-collapse: collapse; table-layout: fixed; font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; line-height: 20px; color: var(--ink); }
.ty-difft col.ln { width: 54px; } .ty-difft col.mk { width: 22px; }
.ty-difft td { padding: 0 10px; vertical-align: top; border: 0; }
.ty-difft td.ln { text-align: right; color: var(--ink-soft); background: var(--paper-2); user-select: none; -webkit-user-select: none; padding: 0 8px; font-size: 11.5px; }
.ty-difft.is-split td.ln:nth-child(3) { border-left: 1px solid var(--line); }
.ty-difft td.mk { text-align: center; user-select: none; -webkit-user-select: none; padding: 0; font-weight: 700; }
.ty-difft td.c { white-space: pre-wrap; word-break: normal; overflow-wrap: anywhere; }
.ty-difft td.c:empty::after { content: "\200B"; }
.ty-difft td.del, .ty-difft tr.del td.mk { background: rgba(229,72,77,0.10); }
.ty-difft td.ins, .ty-difft tr.ins td.mk { background: rgba(47,174,122,0.12); }
.ty-difft tr.del td.mk { color: var(--error); } .ty-difft tr.ins td.mk { color: #1E8058; }
.ty-difft td.del .hl { background: rgba(229,72,77,0.32); border-radius: 2px; }
.ty-difft td.ins .hl { background: rgba(47,174,122,0.36); border-radius: 2px; }
.ty-difft td.nil { background: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--line) 55%, transparent) 6px 7px); }
.ty-difft tr.fold td, .ty-difft tr.more td, .ty-difft tr.same td { text-align: center; padding: 4px 10px; background: rgba(240,169,59,0.07); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ty-difft tr.same td { padding: 18px 10px; font-family: Inter, sans-serif; font-size: 14px; font-weight: 600; color: #1E8058; background: transparent; border: 0; }
.ty-fold { font: inherit; font-size: 12px; color: var(--amber-ink); background: none; border: 0; cursor: pointer; padding: 4px 8px; width: 100%; }
.ty-fold:hover, .ty-fold:focus-visible { text-decoration: underline; outline: none; }
[data-theme="dark"] .ty-fold { color: var(--amber); }
[data-theme="dark"] .ty-difft tr.ins td.mk, [data-theme="dark"] .ty-difft tr.same td { color: #4FD79A; }
[data-theme="dark"] .ty-difft td.del .hl { background: rgba(229,72,77,0.42); }
[data-theme="dark"] .ty-difft td.ins .hl { background: rgba(47,174,122,0.45); }
/* Wrap off: long lines scroll sideways; columns size to their content */
.ty-difft.ty-nowrap { table-layout: auto; width: max-content; min-width: 100%; }
.ty-difft.ty-nowrap td.c { white-space: pre; overflow-wrap: normal; }
.ty-difft.ty-nowrap td.ln { position: sticky; left: 0; z-index: 1; }
.ty-difft.ty-nowrap.is-split td.ln:nth-child(3) { position: static; }
/* side-by-side: selecting text in one column doesn't grab the other */
.ty-difft[data-sel="a"] td.b, .ty-difft[data-sel="b"] td.a { user-select: none; -webkit-user-select: none; }
@media (max-width: 700px) {
  .ty-difft { font-size: 12px; } .ty-difft col.ln { width: 40px; } .ty-difft td { padding: 0 6px; } .ty-difft td.ln { padding: 0 5px; font-size: 11px; }
  .ty-dsum .ty-seg button { padding: 5px 9px; }
}
.ty-difft td.noeol::after { content: " ⌀ no newline at end"; font-size: 10.5px; color: var(--ink-soft); font-style: italic; white-space: nowrap; }

/* ==========================================================================
   JSON-LD SCHEMA GENERATORS (.ty-gen.ty-schema) — FAQ, Article, Breadcrumb, Product, Local Business
   Desktop: form (left, scrolls inside) | preview + checks (top right) + JSON-LD (bottom right).
   Phones: form → preview/checks → code, nothing sticky (the keyboard needs the room).
   ========================================================================== */
.tool-workspace .tool-grid.ty-gen.ty-schema { grid-template-rows: minmax(0, 1.25fr) minmax(0, 1fr); min-height: 600px; }
.ty-sform { gap: 12px; }
.ty-sform .ty-field > label > span { display: inline-flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.ty-sform code, .ty-sprev code { font-family: 'IBM Plex Mono', monospace; font-size: 12px; }
.ty-need { font: 600 10px 'IBM Plex Mono', monospace; letter-spacing: .05em; text-transform: uppercase; padding: 1px 6px; border-radius: 999px; white-space: nowrap; }
.ty-need.req { color: var(--error); background: color-mix(in srgb, var(--error) 10%, transparent); }
.ty-need.rec { color: var(--ink-soft); background: color-mix(in srgb, var(--ink-soft) 12%, transparent); }

/* collapsible groups */
.ty-sgroup { border: 1px solid var(--line); border-radius: 10px; background: var(--paper); flex: 0 0 auto; }
.ty-sgroup > summary { list-style: none; cursor: pointer; padding: 11px 14px; font: 600 11.5px 'IBM Plex Mono', monospace; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink); display: flex; align-items: center; gap: 8px; border-radius: 10px; user-select: none; }
.ty-sgroup > summary::-webkit-details-marker { display: none; }
.ty-sgroup > summary::before { content: "▸"; color: var(--ink-soft); transition: transform .15s; display: inline-block; }
.ty-sgroup[open] > summary::before { transform: rotate(90deg); }
.ty-sgroup > summary:hover { color: var(--amber-ink); } [data-theme="dark"] .ty-sgroup > summary:hover { color: var(--amber); }
.ty-sgroup > summary:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.ty-sgbody { padding: 2px 14px 14px; display: flex; flex-direction: column; gap: 12px; }
.ty-sform .ty-opt { display: flex; gap: 8px; font-size: 13px; color: var(--ink); cursor: pointer; line-height: 1.4; }

/* repeaters */
.ty-rep { display: flex; flex-direction: column; gap: 10px; }
.ty-rep:empty { display: none; }
.ty-rep-row { border: 1px solid var(--line); border-radius: 9px; background: var(--paper-2); }
.ty-rep-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px 6px 12px; border-bottom: 1px solid var(--line); }
.ty-rep-n { font: 600 11px 'IBM Plex Mono', monospace; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-soft); }
.ty-rep-acts { display: flex; gap: 4px; }
.ty-ibtn { width: 30px; height: 28px; border-radius: 7px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-size: 13px; line-height: 1; cursor: pointer; padding: 0; }
.ty-ibtn:hover:not(:disabled) { border-color: var(--amber); }
.ty-ibtn.del:hover:not(:disabled) { border-color: var(--error); color: var(--error); }
.ty-ibtn:disabled { opacity: .35; cursor: default; }
.ty-ibtn:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }
.ty-rep-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 10px; }
.ty-rep-add { align-self: flex-start; border-style: dashed; }

/* preview + checks pane */
.ty-gen .ty-sprev { flex: 1 1 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px 16px; background: var(--editor-bg); display: flex; flex-direction: column; gap: 14px; }
.ty-sstatus { font-size: 12.5px; line-height: 1.5; padding: 9px 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--paper-2); color: var(--ink); flex: 0 0 auto; }
.ty-sstatus.warn { border-color: color-mix(in srgb, var(--amber) 55%, var(--line)); background: color-mix(in srgb, var(--amber) 10%, var(--paper-2)); }
.ty-sstatus.info { border-color: color-mix(in srgb, #3B82F6 40%, var(--line)); background: color-mix(in srgb, #3B82F6 7%, var(--paper-2)); }
.ty-sstatus[hidden] { display: none; }
#preview:empty { display: none; }
.ty-plabel { font: 600 10.5px 'IBM Plex Mono', monospace; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 8px; }
.ty-pempty { margin: 0; font-size: 13px; color: var(--ink-soft); }
.ty-slist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; flex: 0 0 auto; }
.ty-chk { display: flex; gap: 9px; align-items: flex-start; font-size: 12.5px; line-height: 1.45; color: var(--ink); overflow-wrap: anywhere; }
.ty-chk .ic { flex: 0 0 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font: 700 10.5px Inter, sans-serif; color: #fff; margin-top: 1px; }
.ty-chk.err .ic { background: var(--error); }
.ty-chk.warn .ic { background: var(--amber); color: #241601; }
.ty-chk.info .ic { background: #6B7280; font-style: italic; font-family: Georgia, serif; }
.ty-chk.ok .ic { background: #2FAE7A; }
.ty-chk.info .tx, .ty-chk.ok .tx { color: var(--ink-soft); }
.ty-ccount { font: 600 11.5px 'IBM Plex Mono', monospace; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.ty-ccount.err { color: var(--error); background: color-mix(in srgb, var(--error) 11%, transparent); }
.ty-ccount.warn { color: var(--amber-ink); background: color-mix(in srgb, var(--amber) 16%, transparent); }
.ty-ccount.ok { color: #1E8058; background: color-mix(in srgb, #2FAE7A 14%, transparent); }
[data-theme="dark"] .ty-ccount.warn { color: var(--amber); } [data-theme="dark"] .ty-ccount.ok { color: #4FD79A; }

/* Google-style result (always light, like Google) */
.ty-sserp { max-width: 600px; padding: 14px 16px; flex: 0 0 auto; }
.ty-sserp .stitle { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; font-size: 19px; }
.ty-sserp .surl { word-break: normal; overflow-wrap: anywhere; }
.ty-sbody { display: flex; gap: 14px; align-items: flex-start; }
.ty-stxt { flex: 1 1 auto; min-width: 0; }
.ty-sthumb { flex: 0 0 92px; height: 92px; border-radius: 8px; background: #F1F3F4; border: 1px solid #DADCE0; display: grid; place-items: center; font-size: 26px; color: #9AA0A6; }
.ty-srich { font-size: 13px; color: #4D5156; line-height: 1.5; margin: 2px 0 3px; overflow-wrap: anywhere; }
.ty-srich .stars { color: #E7711B; letter-spacing: 1px; }
.ty-srich b { color: #202124; font-weight: 400; }
.ty-srich .sep { margin: 0 5px; }
.ty-sserp .shours { font-size: 13px; color: #4D5156; margin-top: 4px; }
.ty-sserp .shours .open { color: #188038; } .ty-sserp .shours .closed { color: #D93025; }

/* FAQ structure preview */
.ty-faqprev { display: flex; flex-direction: column; gap: 6px; }
.ty-faqitem { border: 1px solid var(--line); border-radius: 9px; background: var(--paper-2); }
.ty-faqitem > summary { cursor: pointer; padding: 9px 12px; font-size: 13.5px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.ty-faqitem > summary:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }
.ty-faqitem .ans { padding: 0 12px 10px; font-size: 13px; line-height: 1.55; color: var(--ink-soft); overflow-wrap: anywhere; white-space: pre-line; }

/* validator links under the code */
.ty-svalid { padding: 8px 14px; border-top: 1px solid var(--line); background: var(--paper); font-size: 12px; color: var(--ink-soft); display: flex; flex-wrap: wrap; gap: 4px 6px; }
.ty-svalid a { color: var(--amber-ink); font-weight: 600; text-decoration: none; }
.ty-svalid a:hover { text-decoration: underline; }
[data-theme="dark"] .ty-svalid a { color: var(--amber); }

@media (max-width: 860px) {
  .tool-workspace .tool-grid.ty-gen.ty-schema { min-height: 0; }
  .ty-gen.ty-schema .ty-gen-prev { order: 0; position: static; box-shadow: none; }
  .ty-gen.ty-schema .ty-gen-prev > .tool-pane-header { min-height: 57px; padding-top: 12px; padding-bottom: 12px; }
  .ty-gen.ty-schema .ty-sprev { flex: 0 0 auto; overflow: visible; }
  .tool-workspace .tool-grid.ty-gen.ty-schema > .ty-gen-code > textarea.tool-textarea { flex: 0 0 auto; height: clamp(240px, 50vh, 420px); }
  .ty-sthumb { flex-basis: 64px; height: 64px; }
}
@media (max-width: 560px) { .ty-sgbody, .ty-rep-body { padding-left: 10px; padding-right: 10px; } .ty-gen.ty-schema .ty-ctl { padding: 12px 10px 18px; } }
/* opening hours (Local Business) */
.ty-hours { display: flex; flex-direction: column; gap: 6px; }
.ty-hrow { display: grid; grid-template-columns: 38px auto auto minmax(0, 1fr); align-items: center; gap: 6px 12px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper-2); }
.ty-hday { font: 600 12px 'IBM Plex Mono', monospace; color: var(--ink); text-transform: uppercase; }
.ty-hrow .ty-opt { font-size: 12.5px; white-space: nowrap; }
.ty-htimes { display: flex; align-items: center; gap: 6px; min-width: 0; justify-content: flex-end; }
.ty-htimes .ty-input { width: auto; min-width: 0; flex: 0 1 112px; padding: 5px 8px; font-size: 13px; }
.ty-htimes .ty-input:disabled { opacity: .45; }
.ty-htimes .to { color: var(--ink-soft); }
@media (max-width: 420px) { .ty-hrow { grid-template-columns: 38px auto auto; } .ty-htimes { grid-column: 1 / -1; justify-content: flex-start; } .ty-htimes .ty-input { flex: 1 1 0; } }
.ty-sform .ty-input, .ty-schema textarea.tool-textarea { font-feature-settings: "calt" 0, "liga" 0; }   /* keep 16x9 / -> etc. literal in URLs */
.ty-sform .ty-field > label, .ty-sform .ty-field > .lbl { min-height: 20px; align-items: center; }
.ty-sform .ty-field > label > span, .ty-sform .ty-field > .lbl { line-height: 20px; }
.ty-need { line-height: 16px; padding: 0 6px; }

/* ===== Batch 8: knowledge-panel card (Organization / Person), schema hub chips, robots.txt URL test, hreflang table ===== */
.ty-kp { max-width: 600px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-2); font-size: 13.5px; line-height: 1.5; color: var(--ink); overflow-wrap: anywhere; }
.ty-kp-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.ty-kp-logo { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 10px; display: grid; place-items: center; background: var(--navy-800); border: 1px solid var(--line); color: #fff; font: 700 20px 'IBM Plex Mono', monospace; }
.ty-kp-logo.round { border-radius: 50%; }
.ty-kp-name { font-size: 18px; font-weight: 700; line-height: 1.25; }
.ty-kp-type { font-size: 12.5px; color: var(--ink-soft); }
.ty-kp-desc { margin: 0 0 10px; color: var(--ink-soft); }
.ty-kp-row { padding: 4px 0; border-top: 1px solid var(--line); }
.ty-kp-row b { font-weight: 600; }
.ty-kp-prof { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ty-kp-chip { padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); font: 500 11.5px 'IBM Plex Mono', monospace; color: var(--ink-soft); }

.ty-hub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--paper); font-size: 13px; }
.ty-hub .lbl { color: var(--ink-soft); margin-right: 2px; }
.ty-hub-chip { padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper-2); color: var(--ink); text-decoration: none; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.ty-hub-chip:hover, .ty-hub-chip:focus-visible { border-color: var(--amber); color: var(--amber-ink); }

.ty-rtest { max-width: 600px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--line); border-left-width: 4px; background: var(--paper-2); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.ty-rtest.ok { border-left-color: var(--signal); }
.ty-rtest.no { border-left-color: var(--error); }
.ty-rtest .big { font-size: 17px; font-weight: 700; margin-bottom: 2px; }
.ty-rtest.ok .big { color: var(--signal); }
.ty-rtest.no .big { color: var(--error); }
.ty-rtest .what { font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; margin-bottom: 4px; }
.ty-rtest .why { color: var(--ink-soft); font-size: 12.5px; }

.ty-hltable { width: 100%; max-width: 640px; border-collapse: collapse; font-size: 13px; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); }
.ty-hltable td { padding: 6px 10px; border-top: 1px solid var(--line); vertical-align: top; }
.ty-hltable tr:first-child td { border-top: 0; }
.ty-hltable td.c { font: 600 12.5px 'IBM Plex Mono', monospace; white-space: nowrap; }
.ty-hltable td.n { color: var(--ink-soft); white-space: nowrap; }
.ty-hltable td.u { font-family: 'IBM Plex Mono', monospace; font-size: 12px; overflow-wrap: anywhere; word-break: break-all; }
@media (max-width: 560px) { .ty-hltable td.n { display: none; } }
.ty-row.hl { grid-template-columns: minmax(0, 1.25fr) minmax(0, 2fr); }
@media (max-width: 560px) { .ty-row.hl { grid-template-columns: 1fr; } }
.ty-smfiles { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--paper); font-size: 13px; }
.ty-smfiles[hidden] { display: none; }
.ty-smfiles .lbl { color: var(--ink-soft); font-weight: 600; }
.ty-kdwrap { background: var(--paper-2); padding: 0; }
.ty-kdwrap > .ty-pempty { padding: 16px; }
.ty-kdtable { width: 100%; border-collapse: collapse; font-size: 13px; }
.ty-kdtable th { position: sticky; top: 0; z-index: 1; background: var(--paper); text-align: left; font: 600 10.5px 'IBM Plex Mono', monospace; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); padding: 8px 12px; border-bottom: 1px solid var(--line); }
.ty-kdtable td { padding: 6px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ty-kdtable .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ty-kdtable td.rk { width: 1%; color: var(--ink-soft); font-size: 12px; font-variant-numeric: tabular-nums; }
.ty-kdtable td.kw { font-weight: 500; overflow-wrap: anywhere; }
.ty-kdtable td.den { position: relative; width: 120px; }
.ty-kdtable td.den .bar { position: absolute; left: 12px; bottom: 4px; height: 3px; max-width: calc(100% - 24px); border-radius: 2px; background: var(--amber); opacity: .7; }
.ty-kdtable td.den .v { position: relative; }
.ty-kdtable tr.hl td { background: rgba(240,169,59,0.12); }
.ty-kdmore { margin: 0; padding: 10px 12px; font-size: 12.5px; color: var(--ink-soft); }
/* UUID validator */
.ty-uvtable td.kw { font-size: 12.5px; font-weight: 400; }
.ty-uvtable td.st { font-weight: 600; white-space: nowrap; }
.ty-uvtable td.st.ok { color: #1D7A54; }
.ty-uvtable td.st.warn { color: var(--amber-ink); }
.ty-uvtable td.st.bad { color: #B4232A; }
.ty-uvtable td.det { font-size: 12.5px; color: var(--ink-soft); overflow-wrap: anywhere; min-width: 160px; }
@media (max-width: 640px) {   /* phones: one card per UUID instead of a 5-column table */
  .ty-uvtable, .ty-uvtable tbody { display: block; }
  .ty-uvtable thead { display: none; }
  .ty-uvtable tr { display: grid; grid-template-columns: 2.4em minmax(0, 1fr) auto; column-gap: 8px; row-gap: 2px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
  .ty-uvtable td { padding: 0; border: 0; }
  .ty-uvtable td.kw { overflow-wrap: anywhere; }
  .ty-uvtable td.det { grid-column: 2; grid-row: 2; min-width: 0; }
  .ty-uvtable td.ver { grid-column: 3; grid-row: 2; text-align: right; font-size: 12px; color: var(--ink-soft); }
  .ty-uvtable td.ver:not(:empty)::before { content: "Ver. "; }
}

/* long URLs / code inside running text must wrap on phones (Batch 9) */
p code, li code { overflow-wrap: anywhere; }

/* Regex Tester (Batch 10) */
.ty-rx-flavour { font: 600 11px 'IBM Plex Mono', monospace; letter-spacing: .06em; text-transform: uppercase; color: var(--amber-ink); background: rgba(240,169,59,0.12); padding: 4px 8px; border-radius: 6px; white-space: nowrap; }
[data-theme="dark"] .ty-rx-flavour { color: var(--amber); }
.ty-rx-flags { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.ty-rx-flags button { min-width: 32px; height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper-2); color: var(--ink-soft); font: 600 13px 'IBM Plex Mono', monospace; cursor: pointer; }
.ty-rx-flags button[aria-pressed="true"] { border-color: var(--amber); background: rgba(240,169,59,0.16); color: var(--amber-ink); }
[data-theme="dark"] .ty-rx-flags button[aria-pressed="true"] { color: var(--amber); }
.ty-rx-flags button:disabled { opacity: .4; cursor: not-allowed; text-decoration: line-through; }
.ty-rx-flags button:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }
.ty-rx-bar { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 12px 16px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--paper); }
.ty-rx-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ty-rx-field > label { font-size: 13px; font-weight: 600; color: var(--ink); }
.ty-rx-field > label .opt { font-weight: 400; font-size: 12px; color: var(--ink-soft); }
.ty-rx-pat { display: flex; align-items: center; min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--paper-2); padding: 0 10px; transition: border-color .15s; }
.ty-rx-pat:focus-within { border-color: var(--amber); }
.ty-rx-pat input { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 14px; padding: 9px 4px; }
.ty-rx-pat input[aria-invalid="true"] { color: var(--error); }
.ty-rx-pat .sl, .ty-rx-pat .fl { font-family: 'IBM Plex Mono', monospace; color: var(--ink-soft); font-size: 15px; }
.ty-rx-pat .fl { color: var(--amber-ink); min-width: 1ch; }
[data-theme="dark"] .ty-rx-pat .fl { color: var(--amber); }
.ty-rx-bar .ty-mono, .ty-rx-hl, .ty-rx-list { font-feature-settings: "calt" 0, "liga" 0; font-variant-ligatures: none; }
@media (max-width: 760px) { .ty-rx-bar { grid-template-columns: minmax(0, 1fr); padding: 12px 14px; } }
.ty-rx-view[hidden] { display: none !important; }
.ty-rx-hl mark { color: inherit; border-radius: 3px; padding: 1px 0; }
.ty-rx-hl mark.a { background: rgba(240,169,59,0.38); box-shadow: inset 0 -2px 0 rgba(200,130,20,0.75); }
.ty-rx-hl mark.b { background: rgba(70,150,230,0.28); box-shadow: inset 0 -2px 0 rgba(40,110,200,0.7); }
.ty-rx-hl mark.z { display: inline-block; width: 2px; height: 1.2em; margin: 0 1px; vertical-align: text-bottom; background: var(--amber); }
.ty-rx-ph { color: var(--ink-soft); font-style: italic; font-family: 'Inter', sans-serif; font-size: 14px; white-space: normal; }
p.ty-rx-ph { margin: 0; padding: 14px 18px; }
.ty-rx-m { padding: 12px 18px; border-bottom: 1px solid var(--line); font-family: 'IBM Plex Mono', monospace; font-size: 13px; min-width: 0; }
.ty-rx-mh { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; margin-bottom: 6px; font-size: 12px; color: var(--ink-soft); }
.ty-rx-mh b { color: var(--amber-ink); font-size: 12.5px; }
[data-theme="dark"] .ty-rx-mh b { color: var(--amber); }
.ty-rx-val { display: block; white-space: pre-wrap; overflow-wrap: anywhere; background: rgba(240,169,59,0.12); border-radius: 5px; padding: 4px 8px; color: var(--ink); }
.ty-rx-g .ty-rx-val { display: inline; padding: 1px 4px; background: rgba(70,150,230,0.14); }
.ty-rx-more, .ty-rx-undef { color: var(--ink-soft); font-style: italic; font-family: 'Inter', sans-serif; font-size: 12px; }
.ty-rx-g { width: 100%; margin-top: 6px; border-collapse: collapse; table-layout: fixed; }
.ty-rx-g th { width: 34%; padding: 3px 10px 3px 0; text-align: left; vertical-align: top; font-weight: 500; font-size: 12px; color: var(--ink-soft); overflow-wrap: anywhere; }
.ty-rx-g td { padding: 3px 0; vertical-align: top; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 480px) { .ty-rx-g th { width: 40%; } .ty-rx-m { padding: 10px 14px; } }

/* Cron Expression Generator (Batch 10) */
.ty-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ty-cr-top { padding: 16px 18px; border-bottom: 1px solid var(--line); background: var(--paper); }
.ty-cr-lbl { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.ty-cr-lbl .opt { font-weight: 400; font-size: 12px; color: var(--ink-soft); font-family: 'IBM Plex Mono', monospace; }
.ty-cr-in { font-size: 20px !important; padding: 12px 14px !important; letter-spacing: .02em; }
.ty-cr-in[aria-invalid="true"], .ty-cr-fin[aria-invalid="true"] { border-color: var(--error) !important; }
.ty-cr-top .ty-mono, .ty-cr-fields .ty-mono, .ty-cr-bd code { font-feature-settings: "calt" 0, "liga" 0; font-variant-ligatures: none; }
.ty-cr-desc { margin: 12px 0 0; font-size: 17px; line-height: 1.5; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.ty-cr-msgs { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ty-cr-msgs:empty { display: none; }
.ty-cr-msg { font-size: 13px; line-height: 1.5; padding: 7px 10px; border-radius: 7px; border: 1px solid var(--line); overflow-wrap: anywhere; }
.ty-cr-msg b { font-weight: 700; margin-right: 2px; }
.ty-cr-msg.error { border-color: rgba(220,50,60,0.4); background: rgba(220,50,60,0.07); color: var(--error); }
.ty-cr-msg.warn { border-color: rgba(240,169,59,0.5); background: rgba(240,169,59,0.10); color: var(--amber-ink); }
[data-theme="dark"] .ty-cr-msg.warn { color: var(--amber); }
.ty-cr-msg.note { background: var(--paper-2); color: var(--ink-soft); }
.ty-cr-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); background: var(--editor-bg); }
.ty-cr-card { min-width: 0; display: flex; flex-direction: column; }
.ty-cr-card + .ty-cr-card { border-left: 1px solid var(--line); }
.ty-cr-ch { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; min-height: 52px; padding: 10px 18px; border-bottom: 1px solid var(--line); background: var(--paper); }
.ty-cr-ch .title { font: 600 12px 'IBM Plex Mono', monospace; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.ty-cr-ch .hint { font-size: 12px; color: var(--ink-soft); }
.ty-cr-ch2 { border-top: 1px solid var(--line); }
.ty-cr-runopts { display: inline-flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.ty-cr-runopts select { width: auto; max-width: 240px; padding: 5px 8px; font-size: 13px; }
.ty-cr-fields { display: flex; flex-direction: column; }
.ty-cr-fields.is-off { opacity: .55; }
.ty-cr-row { padding: 12px 18px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ty-cr-row:last-child { border-bottom: 0; }
.ty-cr-rh { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 10px; }
.ty-cr-rh label { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.ty-cr-rh .rng { font: 12px 'IBM Plex Mono', monospace; color: var(--ink-soft); }
.ty-cr-rc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 8px; }
.ty-cr-fin { font-size: 15px; padding: 7px 10px; }
.ty-cr-mode { padding: 7px 8px; font-size: 13.5px; }
.ty-cr-params { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 13.5px; color: var(--ink); }
.ty-cr-params:empty { display: none; }
.ty-cr-t.muted { color: var(--ink-soft); font-style: italic; font-size: 12.5px; }
.ty-cr-num { width: auto; min-width: 72px; max-width: 140px; padding: 6px 8px; font-size: 13.5px; }
input.ty-cr-num { width: 84px; }
.ty-cr-params .yl { width: 200px; max-width: 100%; padding: 6px 8px; font-size: 13.5px; }
.ty-cr-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 4px; width: 100%; }
.ty-cr-chips.many { grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); }
.ty-cr-chips button { height: 30px; padding: 0 4px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper-2); color: var(--ink-soft); font: 500 12.5px 'IBM Plex Mono', monospace; cursor: pointer; }
.ty-cr-chips button[aria-pressed="true"] { border-color: var(--amber); background: rgba(240,169,59,0.18); color: var(--amber-ink); font-weight: 700; }
[data-theme="dark"] .ty-cr-chips button[aria-pressed="true"] { color: var(--amber); }
.ty-cr-chips button:focus-visible, .ty-cr-ch select:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }
.ty-cr-ferr { font-size: 12.5px; color: var(--error); line-height: 1.45; }
.ty-cr-ferr[hidden] { display: none; }
.ty-cr-runs { list-style: none; margin: 0; padding: 4px 0; }
.ty-cr-run { display: grid; grid-template-columns: 2em minmax(9.5em, max-content) minmax(4.5em, max-content) minmax(0, 1fr); align-items: baseline; column-gap: 12px; row-gap: 2px; padding: 8px 18px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.ty-cr-run:last-child { border-bottom: 0; }
.ty-cr-run .n { color: var(--ink-soft); font: 12px 'IBM Plex Mono', monospace; text-align: right; }
.ty-cr-run .d { color: var(--ink); white-space: nowrap; }
.ty-cr-run .t { font: 600 14px 'IBM Plex Mono', monospace; color: var(--ink); font-variant-numeric: tabular-nums; }
.ty-cr-run .m { color: var(--ink-soft); font-size: 12.5px; text-align: right; white-space: nowrap; }
.ty-cr-dst { grid-column: 2 / -1; justify-self: start; font-size: 12px; font-weight: 600; color: var(--amber-ink); background: rgba(240,169,59,0.14); border-radius: 5px; padding: 2px 7px; }
[data-theme="dark"] .ty-cr-dst { color: var(--amber); }
.ty-cr-none { padding: 14px 18px; color: var(--ink-soft); font-style: italic; font-size: 14px; }
.ty-cr-none.bad { color: var(--error); font-style: normal; font-weight: 600; }
.ty-cr-foot { margin: 0; padding: 0 18px 12px; font-size: 12.5px; line-height: 1.5; color: var(--ink-soft); }
.ty-cr-foot:empty { display: none; }
.ty-cr-bdwrap { overflow-x: auto; }
.ty-cr-bd { width: 100%; border-collapse: collapse; font-size: 13px; }
.ty-cr-bd th, .ty-cr-bd td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.ty-cr-bd th { padding-left: 18px; font-weight: 600; color: var(--ink); white-space: nowrap; width: 1%; }
.ty-cr-bd td.raw { white-space: nowrap; width: 1%; }
.ty-cr-bd td.raw code { overflow-wrap: normal; }
.ty-cr-bd td.v { color: var(--ink-soft); overflow-wrap: anywhere; padding-right: 18px; }
.ty-cr-bd tr.bad td.v { color: var(--error); }
@media (max-width: 900px) {
  .ty-cr-grid { grid-template-columns: minmax(0, 1fr); }
  .ty-cr-card + .ty-cr-card { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 480px) {
  .ty-cr-top, .ty-cr-row { padding-left: 14px; padding-right: 14px; }
  .ty-cr-in { font-size: 17px !important; }
  .ty-cr-desc { font-size: 15.5px; }
  .ty-cr-rc { grid-template-columns: minmax(0, 1fr); }
  .ty-cr-run { grid-template-columns: 1.6em minmax(0, 1fr) auto; padding: 8px 14px; }
  .ty-cr-run .m { grid-column: 2 / -1; text-align: left; }
  .ty-cr-ch { padding: 10px 14px; }
  .ty-cr-runopts select { max-width: 170px; }
  .ty-cr-bd td.raw { white-space: normal; }
  .ty-cr-bd td.raw code { overflow-wrap: anywhere; }
}

/* ---- URL Parser (ty-up-*) ---- */
.ty-up-in { min-height: 110px; flex: 0 0 auto; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-all; font-variant-ligatures: none; font-feature-settings: "calt" 0, "liga" 0; }
.ty-up-sub { border-top: 1px solid var(--line); }
.ty-up-legend { display: inline-flex; flex-wrap: wrap; gap: 2px 8px; text-transform: none; }
.ty-up-color, .ty-up-href { margin: 0; padding: 14px 16px; background: var(--editor-bg); font-family: 'IBM Plex Mono', monospace; font-size: 13.5px; line-height: 1.7; white-space: pre-wrap; word-break: break-all; overflow-wrap: anywhere; color: var(--ink); max-height: 240px; overflow: auto; font-variant-ligatures: none; }
.ty-up-href { font-size: 13px; min-height: 1.7em; }
.ty-up-ph { color: var(--ink-soft); font-style: italic; font-family: inherit; }
.up-s { color: #0B6BCB; font-weight: 600; } .up-u { color: #E5484D; } .up-h { color: #1E8058; font-weight: 600; } .up-p { color: #AD5700; font-weight: 600; }
.up-path { color: var(--ink); } .up-q { color: #8E4EC6; font-weight: 600; } .up-qv { color: #8E4EC6; } .up-f { color: #C2298A; } .up-x { color: var(--ink-soft); }
[data-theme="dark"] .up-s { color: #52A9FF; } [data-theme="dark"] .up-u { color: #FF6369; } [data-theme="dark"] .up-h { color: #4FD79A; } [data-theme="dark"] .up-p { color: #FFB224; }
[data-theme="dark"] .up-q, [data-theme="dark"] .up-qv { color: #BF7AF0; } [data-theme="dark"] .up-f { color: #F383C6; }
.ty-up-checks { border-top: 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.ty-up-checks[hidden] { display: none; }
.ty-up-checks li.info::before { content: "i"; color: #0B6BCB; font-style: italic; font-family: Georgia, serif; width: .8em; text-align: center; }
[data-theme="dark"] .ty-up-checks li.info::before { color: #52A9FF; }
.ty-up-out { min-height: 420px; }
.ty-up-parts td .v { overflow-wrap: anywhere; }
.ty-up-parts .ty-up-full { color: var(--ink-soft); }
.ty-up-show { margin-left: 8px; padding: 2px 8px; }
.ty-up-pwrap { max-height: 420px; overflow: auto; }
.ty-up-params { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; }
.ty-up-params th { position: sticky; top: 0; z-index: 1; background: var(--paper); text-align: left; font: 600 10.5px 'IBM Plex Mono', monospace; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); padding: 7px 12px; border-bottom: 1px solid var(--line); }
.ty-up-params th:first-child { width: 2.8em; } .ty-up-params th:nth-child(2) { width: 34%; }
.ty-up-params td { padding: 7px 12px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; word-break: break-word; }
.ty-up-params td.n { color: var(--ink-soft); font-variant-numeric: tabular-nums; font-size: 12px; }
.ty-up-params .v, .ty-up-segs .v { font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; color: var(--ink); white-space: pre-wrap; word-break: break-all; font-variant-ligatures: none; }
.ty-up-params .v.em { color: var(--ink-soft); font-style: italic; font-family: inherit; }
.ty-up-params .raw, .ty-up-segs .raw { display: block; margin-top: 2px; font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; color: var(--ink-soft); word-break: break-all; }
.ty-up-params .raw::before, .ty-up-segs .raw::before { content: "raw: "; font-family: 'Inter', sans-serif; }
.ty-up-params .tag { display: inline-block; margin-top: 3px; padding: 0 6px; border-radius: 4px; font-size: 10.5px; font-weight: 600; color: var(--amber-ink); background: rgba(240,169,59,0.14); }
.ty-up-params .tag.bad { color: var(--error); background: rgba(229,72,77,0.09); }
.ty-up-params .tag + .tag { margin-left: 4px; }
.ty-up-params td.more, .ty-up-segs li.more { color: var(--ink-soft); font-style: italic; font-size: 12.5px; }
.ty-up-segs { margin: 0; padding: 10px 16px 12px 44px; font-size: 13px; display: flex; flex-direction: column; gap: 4px; max-height: 300px; overflow: auto; }
.ty-up-segs li::marker { color: var(--ink-soft); font-size: 12px; }
@media (max-width: 600px) {
  .ty-up-params th:nth-child(2) { width: 38%; }
  .ty-up-params td, .ty-up-params th { padding-left: 8px; padding-right: 8px; }
  .ty-up-params th:first-child { width: 2.2em; }
  .ty-up-parts th, .ty-up-parts td { padding-left: 12px; padding-right: 12px; }
  .ty-up-out { min-height: 0; }
}
.tool-grid.ty-up-grid .ty-up-in { min-height: 120px; height: 150px; flex: 0 0 auto; resize: vertical; }

/* ---- HTTP Status Code Lookup (ty-hs-*) ---- */
.ty-hs-bar { flex-wrap: wrap; gap: 10px 14px; }
.ty-hs-search { position: relative; flex: 1 1 260px; min-width: 0; display: flex; align-items: center; }
.ty-hs-search svg { position: absolute; left: 11px; color: var(--ink-soft); pointer-events: none; }
.ty-hs-search input { width: 100%; padding-left: 34px; font-size: 15px; }
.ty-hs-cls { flex: 0 0 auto; }
.ty-hs-info:empty { display: none; }
.ty-hs-info p { margin: 0; padding: 10px 16px; font-size: 13.5px; line-height: 1.5; color: var(--ink-soft); border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.ty-hs-info p.warn { color: var(--amber-ink); background: rgba(240,169,59,0.10); }
[data-theme="dark"] .ty-hs-info p.warn { color: var(--amber); }
.ty-hs-list { background: var(--editor-bg); max-height: 70vh; overflow: auto; overscroll-behavior: contain; }
.ty-hs-group[hidden], .ty-hs-item[hidden] { display: none; }
.ty-hs-gh { position: sticky; top: 0; z-index: 2; margin: 0; padding: 8px 16px; background: var(--paper); border-bottom: 1px solid var(--line); font: 600 11px 'IBM Plex Mono', monospace; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-soft); }
.ty-hs-item { border-bottom: 1px solid var(--line); }
.ty-hs-head { display: grid; grid-template-columns: 3.4em minmax(0, 1fr) 18px; gap: 4px 12px; align-items: start; width: 100%; padding: 11px 16px; background: none; border: 0; text-align: left; cursor: pointer; color: var(--ink); font: inherit; }
.ty-hs-head:hover { background: rgba(127,127,127,0.06); }
.ty-hs-head:focus-visible { outline: 2px solid var(--amber); outline-offset: -2px; }
.ty-hs-head .code { font: 700 17px/1.35 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums; }
.c1 .code { color: #0B6BCB; } .c2 .code { color: #1E8058; } .c3 .code { color: #8E4EC6; } .c4 .code { color: #C2560B; } .c5 .code { color: var(--error); }
[data-theme="dark"] .c1 .code { color: #52A9FF; } [data-theme="dark"] .c2 .code { color: #4FD79A; } [data-theme="dark"] .c3 .code { color: #BF7AF0; } [data-theme="dark"] .c4 .code { color: #FF9B54; }
.ty-hs-head .mid { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ty-hs-head .top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.ty-hs-head .nm { font-weight: 650; font-size: 15px; }
.ty-hs-head .sm { font-size: 13px; color: var(--ink-soft); line-height: 1.45; }
.ty-hs-head .kb { font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-soft); white-space: nowrap; }
.ty-hs-head .kb.k-x { color: var(--amber-ink); border-color: rgba(240,169,59,0.5); background: rgba(240,169,59,0.10); }
.ty-hs-head .kb.k-obs, .ty-hs-head .kb.k-deprecated { color: var(--error); border-color: rgba(229,72,77,0.35); }
.ty-hs-head .kb.k-temp { color: #0B6BCB; border-color: rgba(11,107,203,0.35); }
[data-theme="dark"] .ty-hs-head .kb.k-x { color: var(--amber); }
.ty-hs-head .chev { width: 9px; height: 9px; margin-top: 7px; border-right: 2px solid var(--ink-soft); border-bottom: 2px solid var(--ink-soft); transform: rotate(45deg); transition: transform .15s; }
.ty-hs-item.open .chev { transform: rotate(-135deg); margin-top: 11px; }
.ty-hs-item.open { background: var(--paper); }
.ty-hs-body { padding: 2px 16px 16px calc(16px + 3.4em + 12px); font-size: 14px; line-height: 1.6; color: var(--ink); overflow-wrap: anywhere; }
.ty-hs-body[hidden] { display: none; }
.ty-hs-body p { margin: 0 0 10px; }
.ty-hs-body .sent { padding: 8px 12px; border-radius: 8px; background: rgba(240,169,59,0.10); color: var(--amber-ink); font-size: 13.5px; }
[data-theme="dark"] .ty-hs-body .sent { color: var(--amber); }
.ty-hs-body .facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 16px; margin: 0 0 12px; font-size: 13px; }
.ty-hs-body .facts dt { color: var(--ink-soft); }
.ty-hs-body .facts dd { margin: 0; }
.ty-hs-body .blk { margin: 0 0 10px; }
.ty-hs-body .bt { font: 600 11px 'IBM Plex Mono', monospace; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 4px; }
.ty-hs-body ul { margin: 0; padding-left: 20px; font-size: 13.5px; }
.ty-hs-body .hdr li { font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; }
.ty-hs-body .seo { font-size: 13.5px; color: var(--ink-soft); }
.ty-hs-body .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
@media (max-width: 600px) {
  .ty-hs-head { grid-template-columns: 2.9em minmax(0, 1fr) 14px; gap: 2px 10px; padding: 10px 12px; }
  .ty-hs-head .code { font-size: 15.5px; }
  .ty-hs-body { padding: 2px 12px 14px; }
  .ty-hs-body .facts { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .ty-hs-body .facts dd { margin-bottom: 6px; }
  .ty-hs-cls { width: 100%; overflow-x: auto; }
  .ty-hs-list { max-height: none; }
}
.ty-hs-body a { color: var(--amber-ink); text-decoration: underline; text-underline-offset: 2px; }
[data-theme="dark"] .ty-hs-body a { color: var(--amber); }

/* ---- MIME Type Lookup (ty-mt-*; search bar shares .ty-hs-*) ---- */
.ty-mt-cat { flex: 0 0 auto; width: auto; min-width: 9.5em; }
.ty-mt-card { padding: 16px 18px; border-bottom: 1px solid var(--line); background: var(--paper); font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.ty-mt-card[hidden] { display: none; }
.ty-mt-card .ch { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 8px; }
.ty-mt-card .ext { font: 700 20px 'IBM Plex Mono', monospace; color: var(--ink); word-break: break-all; }
.ty-mt-card .from { font-size: 13px; color: var(--ink-soft); }
.ty-mt-card .lbl { display: block; font: 600 11px 'IBM Plex Mono', monospace; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 4px; }
.ty-mt-card .main { margin: 6px 0 10px; }
.ty-mt-card .val { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ty-mt-card .val .ty { font: 600 17px 'IBM Plex Mono', monospace; color: #1E8058; word-break: break-all; }
[data-theme="dark"] .ty-mt-card .val .ty { color: #4FD79A; }
.ty-mt-card .sub { display: block; font-size: 12.5px; color: var(--ink-soft); margin-top: 3px; }
.ty-mt-card .alts ul { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.ty-mt-card .alts li { display: inline-flex; align-items: baseline; gap: 6px; }
.ty-mt-card code { font-family: 'IBM Plex Mono', monospace; font-size: 13px; font-variant-ligatures: none; }
.ty-mt-card .src { font-size: 11px; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 999px; padding: 0 6px; }
.ty-mt-card .note, .ty-mt-card .v2, .ty-mt-card .unk { margin: 0 0 10px; padding: 8px 12px; border-radius: 8px; font-size: 13.5px; }
.ty-mt-card .note { background: rgba(11,107,203,0.07); }
.ty-mt-card .v2 { background: rgba(127,127,127,0.08); color: var(--ink-soft); }
.ty-mt-card .unk { background: rgba(240,169,59,0.10); color: var(--amber-ink); }
[data-theme="dark"] .ty-mt-card .unk { color: var(--amber); }
.ty-mt-card .facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 3px 16px; margin: 4px 0 12px; font-size: 13px; }
.ty-mt-card .facts dt { color: var(--ink-soft); } .ty-mt-card .facts dd { margin: 0; }
.ty-mt-card .snips { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 10px; }
.ty-mt-card .snip { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--editor-bg); min-width: 0; }
.ty-mt-card .snip .sh { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 5px 6px 5px 12px; font-size: 12px; color: var(--ink-soft); border-bottom: 1px solid var(--line); }
.ty-mt-card .snip pre { margin: 0; padding: 10px 12px; font: 12.5px/1.55 'IBM Plex Mono', monospace; white-space: pre-wrap; word-break: break-all; color: var(--ink); font-variant-ligatures: none; }
.ty-mt-wrap { max-height: 60vh; overflow: auto; background: var(--editor-bg); overscroll-behavior: contain; }
.ty-mt-table { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; }
.ty-mt-table th { position: sticky; top: 0; z-index: 1; background: var(--paper); text-align: left; font: 600 10.5px 'IBM Plex Mono', monospace; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); padding: 8px 14px; border-bottom: 1px solid var(--line); }
.ty-mt-table th:nth-child(1) { width: 52%; } .ty-mt-table th:nth-child(3) { width: 6.5em; }
.ty-mt-table td { padding: 6px 14px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; word-break: break-word; }
.ty-mt-table .tlink { background: none; border: 0; padding: 0; font: 13px 'IBM Plex Mono', monospace; color: var(--ink); text-align: left; cursor: pointer; word-break: break-all; font-variant-ligatures: none; }
.ty-mt-table .tlink:hover, .ty-mt-table .tlink:focus-visible { color: var(--amber-ink); text-decoration: underline; }
.ty-mt-table .ex { font: 12.5px 'IBM Plex Mono', monospace; color: var(--ink-soft); word-break: break-all; }
.ty-mt-table .src { font-size: 12px; color: var(--ink-soft); } .ty-mt-table .src.s-i { color: #1E8058; font-weight: 600; }
[data-theme="dark"] .ty-mt-table .src.s-i { color: #4FD79A; }
.ty-mt-more { display: block; margin: 10px auto; }
.ty-mt-more[hidden] { display: none; }
.ty-mt-files { border-top: 1px solid var(--line); padding: 14px 16px; background: var(--paper); }
.ty-mt-fhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.ty-mt-fhead b { display: block; font-size: 14px; } .ty-mt-fhead span { font-size: 12.5px; color: var(--ink-soft); }
.ty-mt-drop { min-height: 70px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 13px; color: var(--ink-soft); }
.ty-mt-drop.over { border-color: var(--amber); background: rgba(240,169,59,0.08); }
.ty-mt-fwrap { margin-top: 10px; overflow-x: auto; }
.ty-mt-fwrap[hidden] { display: none; }
.ty-mt-ftable { width: 100%; border-collapse: collapse; font-size: 13px; }
.ty-mt-ftable th { text-align: left; font: 600 10.5px 'IBM Plex Mono', monospace; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); padding: 6px 10px; border-bottom: 1px solid var(--line); }
.ty-mt-ftable td { padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.ty-mt-ftable tr.bad td { background: rgba(229,72,77,0.05); }
.ty-mt-ftable .name { display: block; font-weight: 600; word-break: break-all; } .ty-mt-ftable .size, .ty-mt-ftable .dl { display: block; font-size: 12px; color: var(--ink-soft); }
.ty-mt-ftable code { font: 12.5px 'IBM Plex Mono', monospace; word-break: break-all; }
.ty-mt-ftable .bs { font: 12.5px 'IBM Plex Mono', monospace; color: var(--ink-soft); word-break: break-all; }
.ty-mt-ftable .tag { display: inline-block; margin-top: 3px; padding: 0 7px; border-radius: 4px; font-size: 11px; font-weight: 600; background: rgba(127,127,127,0.1); color: var(--ink-soft); }
.ty-mt-ftable .tag.ok { color: #1E8058; background: rgba(47,174,122,0.1); } .ty-mt-ftable .tag.bad { color: var(--error); background: rgba(229,72,77,0.1); }
.ty-mt-ftable td.more { color: var(--ink-soft); font-style: italic; }
@media (max-width: 600px) {
  .ty-mt-cat { flex: 1 1 auto; }
  .ty-mt-table th:nth-child(1) { width: 58%; } .ty-mt-table th:nth-child(3) { width: 4.8em; }
  .ty-mt-table td, .ty-mt-table th { padding-left: 10px; padding-right: 10px; }
  .ty-mt-table th:nth-child(2), .ty-mt-table td.ex { display: none; }
  .ty-mt-wrap { max-height: none; }
  .ty-mt-ftable thead { display: none; }
  .ty-mt-ftable tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-bottom: 1px solid var(--line); }
  .ty-mt-ftable td { border: 0; padding: 6px 8px; }
  .ty-mt-ftable td.fn { grid-column: 1 / -1; }
  .ty-mt-ftable td.bs { display: none; }
  .ty-mt-card .facts { grid-template-columns: minmax(0, 1fr); gap: 0; } .ty-mt-card .facts dd { margin-bottom: 6px; }
}

/* ---- CSS Flexbox Generator (ty-fb-*) ---- */
.ty-gen .ty-stage.ty-fb-stage { display: flex; align-items: flex-start; justify-content: flex-start; padding: 18px 18px 32px; }
.ty-fb-stage .ty-stage-note { white-space: nowrap; max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis; }
.ty-fb-box { flex: 0 0 auto; margin: auto; box-sizing: border-box; max-width: none; outline: 2px dashed rgba(240,169,59,.75); outline-offset: 0; background: rgba(240,169,59,.07); border-radius: 4px; }
.ty-fb-item { box-sizing: border-box; padding: 8px 14px; border-radius: 8px; background: #F0A93B; color: #241601; font-family: 'Space Grotesk', Inter, sans-serif; font-weight: 700; line-height: 1.15; cursor: pointer; user-select: none; }
.ty-fb-item.alt { background: #F6C877; }
.ty-fb-item.sel { box-shadow: 0 0 0 3px #0F172A; position: relative; z-index: 1; }
.ty-stage[data-bg="dark"] .ty-fb-item.sel { box-shadow: 0 0 0 3px #FFFFFF; }
.ty-ctl .ty-input.bad { border-color: var(--error); }
.ty-ctl .ty-line > .lbl code { font-size: 12px; }
.ty-fb-stage .ty-stage-note { z-index: 3; }

/* ---- CSS Grid Generator (ty-gd-*; stage shares .ty-fb-stage) ---- */
.ty-gd-box { flex: 0 0 auto; margin: auto; position: relative; box-sizing: border-box; outline: 2px dashed rgba(240,169,59,.75); background: rgba(240,169,59,.05); border-radius: 4px; }
.ty-gd-item { position: relative; z-index: 1; box-sizing: border-box; padding: 8px 12px; border-radius: 8px; background: #F0A93B; color: #241601; font: 600 13px/1.2 'IBM Plex Mono', monospace; cursor: pointer; user-select: none; }   /* no min-width/overflow-wrap here: they would change how fr/auto tracks size */
.ty-gd-item.alt { background: #F6C877; }
.ty-gd-item.sel { box-shadow: 0 0 0 3px #0F172A; z-index: 2; }
.ty-stage[data-bg="dark"] .ty-gd-item.sel { box-shadow: 0 0 0 3px #FFFFFF; }
.ty-gd-cells { position: absolute; inset: 0; display: grid; z-index: 0; touch-action: none; }
.ty-gd-cells > div { border: 1px dashed rgba(100,116,139,.45); border-radius: 6px; background: rgba(255,255,255,.35); cursor: crosshair; min-width: 0; min-height: 0; }
.ty-stage[data-bg="dark"] .ty-gd-cells > div { border-color: rgba(203,213,225,.35); background: rgba(255,255,255,.04); }
.ty-gd-cells > div.on { background: rgba(59,130,246,.28); border: 2px solid #3B82F6; }
.ty-ctl .ty-gd-txt { padding: 6px 10px; font: 13px 'IBM Plex Mono', monospace; font-variant-ligatures: none; max-width: 100%; box-sizing: border-box; }

/* ---- CSS Clip-Path Generator (ty-cp-*) ---- */
.ty-gen .ty-stage.ty-cp-stage { padding: 18px 18px 30px; }
.ty-cp-stage .ty-stage-note { z-index: 4; white-space: nowrap; max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis; }
.ty-cp-wrap { position: relative; flex: 0 0 auto; margin: auto; outline: 1px dashed rgba(100,116,139,.6); outline-offset: 0; user-select: none; -webkit-user-select: none; }
.ty-stage[data-bg="dark"] .ty-cp-wrap { outline-color: rgba(203,213,225,.45); }
.ty-cp-box { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.ty-cp-ghost, .ty-cp-subject { position: absolute; inset: 0; }
.ty-cp-ghost { opacity: .2; }
.ty-cp-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.ty-cp-svg > * { fill: none; stroke: #0F172A; stroke-width: 1.5; stroke-dasharray: 5 4; }
.ty-stage[data-bg="dark"] .ty-cp-svg > * { stroke: #FFFFFF; }
.ty-cp-handles { position: absolute; inset: 0; pointer-events: none; }
.ty-cp-h { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; padding: 0; border-radius: 50%; border: 2px solid #fff; background: #0F172A; color: #fff;
  font: 700 10px/1 Inter, sans-serif; display: flex; align-items: center; justify-content: center; cursor: grab; pointer-events: auto; touch-action: none; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.ty-cp-h:active { cursor: grabbing; }
.ty-cp-h::after { content: ""; position: absolute; inset: -10px; border-radius: 50%; }   /* bigger touch target */
.ty-cp-h.sel { background: #F0A93B; color: #241601; border-color: #0F172A; }
.ty-cp-h:focus-visible { outline: 3px solid #3B82F6; outline-offset: 2px; }
.ty-cp-h-c { background: #3B82F6; }
.ty-cp-h-cr, .ty-cp-h-rx, .ty-cp-h-ry, .ty-cp-h-it, .ty-cp-h-ir, .ty-cp-h-ib, .ty-cp-h-il { background: #fff; border-color: #0F172A; width: 18px; height: 18px; margin: -9px 0 0 -9px; }
.ty-cp-pre { width: 40px; height: 40px; padding: 6px; display: inline-flex; align-items: stretch; justify-content: stretch; }
.ty-cp-pre:hover { border-color: var(--amber); }
.ty-cp-pre > i { flex: 1; background: #F0A93B; }
.ty-cp-pre > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ty-cp-pts { display: flex; flex-direction: column; gap: 4px; max-height: 300px; overflow-y: auto; padding: 2px; }
.ty-cp-row { display: grid; grid-template-columns: 28px 12px minmax(0, 1fr) 12px minmax(0, 1fr) 28px 28px; align-items: center; gap: 6px; padding: 3px 4px; border-radius: 8px; font-size: 12px; color: var(--ink-soft); }
.ty-cp-row.sel { background: rgba(240,169,59,.16); }
.ty-cp-row .ty-num { width: 100%; min-width: 0; box-sizing: border-box; }
.ty-cp-idx, .ty-cp-mini { width: 28px; height: 28px; padding: 0; border-radius: 8px; border: 1px solid var(--line); background: var(--paper-2); color: var(--ink); font: 600 12px Inter, sans-serif; cursor: pointer; }
.ty-cp-row.sel .ty-cp-idx { background: #F0A93B; border-color: #F0A93B; color: #241601; }
.ty-cp-mini:disabled { opacity: .4; cursor: not-allowed; }
.ty-cp-idx:focus-visible, .ty-cp-mini:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }

/* ---- CSS Transform Generator (ty-tf-*) ---- */
.ty-gen .ty-stage.ty-tf-stage { overflow: hidden; padding: 18px 18px 30px; }
.ty-tf-stage .ty-stage-note { z-index: 4; white-space: nowrap; max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis; }
.ty-tf-fit { flex: 0 0 auto; transform-origin: 0 0; }
.ty-tf-wrap { position: relative; }
.ty-tf-ghost { position: absolute; inset: 0; border: 2px dashed rgba(100,116,139,.7); border-radius: 10px; box-sizing: border-box; }
.ty-stage[data-bg="dark"] .ty-tf-ghost { border-color: rgba(203,213,225,.5); }
.ty-tf-subject { position: absolute; inset: 0; border-radius: 10px; background: linear-gradient(135deg, #F0A93B, #E2725B); color: #241601; box-shadow: 0 6px 18px -6px rgba(0,0,0,.35);
  display: flex; align-items: center; justify-content: center; overflow: hidden; user-select: none; }
.ty-tf-t { font: 700 30px/1 'Space Grotesk', Inter, sans-serif; }
.ty-tf-c { position: absolute; left: 7px; top: 5px; font: 700 11px/1 'IBM Plex Mono', monospace; opacity: .8; }
.ty-tf-up { position: absolute; top: 5px; left: 50%; transform: translateX(-50%); font: 600 9.5px/1 'IBM Plex Mono', monospace; opacity: .75; white-space: nowrap; }
.ty-tf-probe { position: absolute; left: 0; top: 0; visibility: hidden; pointer-events: none; }
.ty-tf-dot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #3B82F6; border: 2px solid #fff; box-shadow: 0 0 0 1px #0F172A; z-index: 2; pointer-events: none; }
.ty-tf-origin { display: grid; grid-template-columns: repeat(3, 34px); gap: 4px; }
.ty-tf-origin button { height: 30px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper-2); color: var(--ink); cursor: pointer; font-size: 13px; padding: 0; }
.ty-tf-origin button[aria-pressed="true"] { background: var(--amber); border-color: var(--amber); color: #241601; }
.ty-tf-origin button:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }
.ty-tf-order { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; max-width: 280px; }
.ty-tf-order li { display: grid; grid-template-columns: 1fr 28px 28px; gap: 6px; align-items: center; font-size: 13px; font-weight: 600; padding: 3px 4px 3px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper-2); }

/* ---- CSS Filter Generator (ty-fl-*) ---- */
.ty-gen .ty-stage.ty-fl-stage { overflow: hidden; padding: 22px 22px 32px; }
.ty-fl-stage .ty-stage-note { z-index: 4; white-space: nowrap; max-width: calc(100% - 150px); overflow: hidden; text-overflow: ellipsis; }
.ty-fl-scene { position: absolute; inset: 22px 22px 32px; display: flex; align-items: center; justify-content: center; }
.ty-fl-img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; user-select: none; -webkit-user-select: none; }
.ty-fl-stage[data-mode="backdrop"]:not([data-img="logo"]) .ty-fl-scene { inset: 0; }
.ty-fl-stage[data-mode="backdrop"]:not([data-img="logo"]) .ty-fl-img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; }
.ty-fl-glass { position: absolute; left: 50%; top: 50%; width: 58%; height: 52%; transform: translate(-50%, -50%); border-radius: 16px; border: 1px solid rgba(255,255,255,.55);
  display: flex; align-items: flex-end; justify-content: flex-start; padding: 10px 12px; box-sizing: border-box; }
.ty-fl-glass span { font: 600 11px 'IBM Plex Mono', monospace; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.ty-fl-cmp { position: absolute; right: 10px; bottom: 6px; z-index: 5; padding: 5px 10px; border-radius: 999px; border: 1px solid rgba(15,23,42,.25); background: rgba(255,255,255,.88);
  font: 600 11.5px Inter, sans-serif; color: #0F172A; cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: none; -webkit-touch-callout: none; }
.ty-fl-cmp.on { background: #F0A93B; border-color: #F0A93B; color: #241601; }
.ty-fl-cmp:focus-visible { outline: 2px solid #3B82F6; outline-offset: 2px; }
.ty-group.ty-off { opacity: .5; }

/* =====================================================================
   CSS NEUMORPHISM GENERATOR  (Batch 11)
   ===================================================================== */
/* --- NEUMORPHISM demo start (extracted verbatim by scripts/test_batch11.py) --- */
.ty-nm-demo { font-family: Inter, sans-serif; }
.ty-nm-card { width: min(300px, 100%); padding: 18px; display: flex; flex-direction: column; gap: 14px; box-sizing: border-box; }
.ty-nm-row { display: flex; align-items: center; gap: 12px; }
.ty-nm-ico { width: 44px; height: 44px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; }
.ty-nm-ico.sm { width: 38px; height: 38px; margin-left: auto; }
.ty-nm-txt { min-width: 0; }
.ty-nm-t1 { font: 700 15px 'Space Grotesk', sans-serif; line-height: 1.25; }
.ty-nm-t2 { font: 400 12.5px Inter, sans-serif; margin-top: 3px; }
.ty-nm-pill { height: 36px; padding: 0 16px; border-radius: 999px; display: inline-flex; align-items: center; gap: 7px; font: 600 13px Inter, sans-serif; }
/* --- NEUMORPHISM demo end --- */

.ty-nm-ang { display: flex; align-items: center; gap: 14px; }
.ty-nm-angctl { flex: 1 1 auto; min-width: 0; }
.ty-nm-dial { width: 54px; height: 54px; flex: 0 0 auto; }
.ty-nm-dial .d-face { fill: var(--paper-2); stroke: var(--line); stroke-width: 1; }
.ty-nm-dial .d-ray { stroke: var(--ink-soft); stroke-width: 2.5; stroke-linecap: round; opacity: .5; }
.ty-nm-dial .d-sun { fill: var(--amber); stroke: var(--amber-ink); stroke-width: 1; }
.ty-nm-dial .d-hub { fill: var(--ink-soft); }
@media (max-width: 860px) {
  .ty-nm-card { width: min(262px, 100%); padding: 14px; gap: 10px; }
  .ty-nm-ico { width: 38px; height: 38px; }
  .ty-nm-ico.sm { width: 34px; height: 34px; }
  .ty-nm-pill { height: 32px; padding: 0 14px; font-size: 12.5px; }
}

/* =====================================================================
   CSS MEDIA QUERY GENERATOR  (Batch 11)
   ===================================================================== */
.ty-mq-frame { width: 100%; max-width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: 0 10px 28px rgba(15, 23, 42, .1); }
.ty-mq-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--paper-2); border-bottom: 1px solid var(--line); }
.ty-mq-dots { display: inline-flex; gap: 5px; flex: 0 0 auto; }
.ty-mq-dots i { width: 9px; height: 9px; border-radius: 50%; background: #d5d9e2; }
.ty-mq-url { flex: 1 1 auto; min-width: 0; font: 500 11.5px 'IBM Plex Mono', monospace; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ty-mq-match { flex: 0 0 auto; font: 600 11px 'IBM Plex Mono', monospace; padding: 3px 9px; border-radius: 999px; background: #eceef2; color: #69707f; }
.ty-mq-match.on { background: #e2f6ec; color: #177a4c; }
.ty-mq-clip { width: 100%; overflow: hidden; }
.ty-mq-iframe { display: block; border: 0; background: #fff; }
@media (max-width: 860px) { .ty-mq-iframe { height: 240px; } }
