/* Custom Converter – scoped styles. Everything lives under .tn so it plays nicely with any theme. */
.tn {
  --tn-ink: #0f172a;
  --tn-text: #334155;
  --tn-muted: #64748b;
  --tn-line: #e2e8f0;
  --tn-bg: #ffffff;
  --tn-soft: #f8fafc;
  --tn-brand: #4f46e5;
  --tn-brand-2: #4338ca;
  --tn-brand-soft: #eef2ff;
  --tn-grad: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  --tn-accent: #f59e0b;
  --tn-good: #15803d;
  --tn-good-soft: #ecfdf3;
  --tn-warn: #b45309;
  --tn-warn-soft: #fffbeb;
  --tn-bad: #b42318;
  --tn-bad-soft: #fef3f2;
  --tn-c0: #4f46e5;
  --tn-c1: #f59e0b;
  --tn-c2: #06b6d4;
  --tn-c3: #94a3b8;
  --tn-c4: #e11d48;
  --c: #4f46e5;
  --tn-radius: 14px;
  --tn-font: inherit;
  --tn-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-family: var(--tn-font);
  color: var(--tn-text);
  font-size: 16px;
  line-height: 1.55;
}
.tn *, .tn *::before, .tn *::after { box-sizing: border-box; }
.tn [hidden] { display: none !important; }
.tn h2, .tn h3 { color: var(--tn-ink); line-height: 1.25; }
.tn a { color: var(--tn-brand); }
.tn small { color: var(--tn-muted); }

/* breadcrumb + lead */
.tn-breadcrumb { font-size: 13px; color: var(--tn-muted); margin: 0 0 10px; }
.tn-breadcrumb a { color: var(--tn-muted); text-decoration: none; }
.tn-breadcrumb a:hover { color: var(--tn-brand); text-decoration: underline; }
.tn-sep { margin: 0 4px; opacity: .6; }
.tn-lead { font-size: 17px; color: var(--tn-muted); margin: 0 0 18px; max-width: 70ch; }

/* tool card */
.tn-tool { background: var(--tn-bg); border: 1px solid var(--tn-line); border-radius: 20px; padding: clamp(16px, 3vw, 26px); box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 18px 40px -24px rgba(15, 23, 42, .25); margin-bottom: 36px; }
.tn-loading { color: var(--tn-muted); padding: 24px 0; text-align: center; }
.tn-calc + .tn-calc { margin-top: 26px; padding-top: 22px; border-top: 1px dashed var(--tn-line); }
.tn-sub { font-size: 16px; font-weight: 700; margin: 18px 0 10px; color: var(--tn-ink); }
.tn-calc > .tn-sub:first-child { margin-top: 0; }

/* form */
.tn-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px 16px; align-items: end; }
.tn-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tn-field.tn-wide { grid-column: 1 / -1; }
.tn-field > label, .tn-lbl { font-size: 13px; font-weight: 600; color: var(--tn-ink); }
.tn-help { font-size: 12px; }
.tn input[type=text], .tn input[type=date], .tn input[type=time], .tn input[type=month], .tn input[type=url], .tn input[type=search], .tn input[type=file], .tn select, .tn textarea {
  width: 100%; min-height: 44px; padding: 9px 12px; font: inherit; font-size: 16px; color: var(--tn-ink);
  background: var(--tn-bg); border: 1px solid #cfd6e1; border-radius: 10px; outline: none; margin: 0; box-shadow: none;
  transition: border-color .15s, box-shadow .15s;
}
.tn textarea { min-height: 0; resize: vertical; line-height: 1.5; }
.tn input:focus, .tn select:focus, .tn textarea:focus { border-color: var(--tn-brand); box-shadow: 0 0 0 3px rgba(79, 70, 229, .18); }
.tn-input { position: relative; display: flex; align-items: stretch; }
.tn-input input { flex: 1; min-width: 0; }
.tn-input.has-suf input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.tn-input.has-pre input { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.tn-pre, .tn-suf { display: flex; align-items: center; padding: 0 10px; background: var(--tn-soft); border: 1px solid #cfd6e1; color: var(--tn-muted); font-size: 14px; white-space: nowrap; }
.tn-suf { border-left: 0; border-radius: 0 10px 10px 0; }
.tn-pre { border-right: 0; border-radius: 10px 0 0 10px; }
.tn-check { display: flex; align-items: center; gap: 8px; font-size: 14px; min-height: 44px; cursor: pointer; }
.tn-check input { width: 18px; height: 18px; accent-color: var(--tn-brand); }
.tn-seg { display: inline-flex; flex-wrap: wrap; background: var(--tn-soft); border: 1px solid var(--tn-line); border-radius: 10px; padding: 3px; gap: 3px; }
.tn-seg label { margin: 0; cursor: pointer; }
.tn-seg input { position: absolute; opacity: 0; pointer-events: none; }
.tn-seg span { display: block; padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--tn-muted); }
.tn-seg input:checked + span { background: var(--tn-bg); color: var(--tn-brand); box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }
.tn-seg input:focus-visible + span { outline: 2px solid var(--tn-brand); }

/* buttons */
.tn-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 18px; font: inherit; font-size: 15px; font-weight: 600; border-radius: 10px; border: 1px solid var(--tn-brand); background: var(--tn-brand); color: #fff; cursor: pointer; text-decoration: none; line-height: 1.2; }
.tn-btn:hover { background: var(--tn-brand-2); border-color: var(--tn-brand-2); color: #fff; }
.tn-btn:disabled { opacity: .6; cursor: progress; }
.tn-btn-ghost { background: var(--tn-bg); color: var(--tn-brand); border-color: #cfd6e1; }
.tn-btn-ghost:hover { background: var(--tn-brand-soft); color: var(--tn-brand-2); border-color: var(--tn-brand); }
.tn-swap { align-self: end; }
.tn-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.tn-actions-sm .tn-btn { min-height: 36px; padding: 6px 12px; font-size: 13px; }

/* results */
.tn-result { margin-top: 20px; }
.tn-result:empty, .tn-result.is-empty { display: none; }
.tn-hero-res { background: var(--tn-grad); color: #fff; border-radius: var(--tn-radius); padding: 20px 22px; box-shadow: 0 14px 30px -18px rgba(79, 70, 229, .8); display: flex; flex-direction: column; gap: 2px; }
.tn-hero-res > span { font-size: 13px; opacity: .85; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.tn-hero-res strong { font-size: clamp(26px, 5vw, 38px); line-height: 1.15; font-weight: 800; font-variant-numeric: tabular-nums; word-break: break-word; }
.tn-hero-res small { color: rgba(255, 255, 255, .85); font-size: 14px; }
.tn-hero-res strong small { color: inherit; font-size: .5em; font-weight: 600; }
.tn-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-top: 12px; }
.tn-stat { background: var(--tn-soft); border: 1px solid var(--tn-line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tn-stat > span { font-size: 12.5px; color: var(--tn-muted); font-weight: 600; }
.tn-stat strong { font-size: 18px; color: var(--tn-ink); font-variant-numeric: tabular-nums; word-break: break-word; }
.tn-stat strong small { font-weight: 500; }
.tn-stat > small { font-size: 12px; }
.tn-big { font-size: 28px; }
.tn-pill { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 13px; font-weight: 700; background: rgba(255, 255, 255, .2); color: #fff; }
.tn-msg { padding: 12px 14px; border-radius: 10px; background: var(--tn-soft); border: 1px solid var(--tn-line); margin: 12px 0 0; font-size: 15px; }
.tn-msg.good { background: var(--tn-good-soft); border-color: #bfe5cb; color: #14532d; }
.tn-msg.warn { background: var(--tn-warn-soft); border-color: #fbd9a5; color: #7c2d12; }
.tn-msg.bad, .tn-err { background: var(--tn-bad-soft); border-color: #f7c6c0; color: var(--tn-bad); padding: 12px 14px; border-radius: 10px; }
.tn-bad { color: var(--tn-bad); }
.tn-note { font-size: 13px; color: var(--tn-muted); margin: 14px 0 0; }

/* tables */
.tn-table-wrap { overflow-x: auto; margin-top: 12px; border: 1px solid var(--tn-line); border-radius: 10px; }
.tn-table-wrap.tn-scroll { max-height: 420px; overflow-y: auto; }
.tn-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; margin: 0; border: 0; }
.tn-table th { position: sticky; top: 0; background: var(--tn-soft); color: var(--tn-ink); font-weight: 700; text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--tn-line); white-space: nowrap; }
.tn-table td { padding: 8px 12px; border: 0; border-bottom: 1px solid var(--tn-line); }
.tn-table tr:last-child td { border-bottom: 0; }
.tn-table tbody tr:nth-child(even) td { background: #fafbfc; }
.tn-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .tn-two { grid-template-columns: 1fr; } }

/* split bar + gauge */
.tn-split { margin-top: 14px; }
.tn-split-bar { display: flex; height: 14px; border-radius: 99px; overflow: hidden; background: var(--tn-soft); }
.tn-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 13px; color: var(--tn-muted); }
.tn-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.tn .c0 { background: var(--tn-c0); } .tn .c1 { background: var(--tn-c1); } .tn .c2 { background: var(--tn-c2); } .tn .c3 { background: var(--tn-c3); } .tn .c4 { background: var(--tn-c4); }
.tn-gauge { position: relative; margin: 18px 0 6px; }
.tn-gauge-bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; }
.tn-gauge-bar span:nth-child(1) { background: #60a5fa; } .tn-gauge-bar span:nth-child(2) { background: #22c55e; } .tn-gauge-bar span:nth-child(3) { background: #f59e0b; } .tn-gauge-bar span:nth-child(4) { background: #ef4444; }
.tn-gauge i { position: absolute; top: -5px; width: 4px; height: 22px; background: var(--tn-ink); border-radius: 2px; transform: translateX(-2px); box-shadow: 0 0 0 2px #fff; }
.tn-gauge-lbl { display: flex; justify-content: space-between; font-size: 11px; color: var(--tn-muted); margin-top: 4px; }
.tn-gauge-lbl span:nth-child(2) { margin-left: 8%; } .tn-gauge-lbl span:nth-child(3) { margin-left: -14%; }

/* tabs */
.tn-tabs { display: inline-flex; gap: 4px; background: var(--tn-soft); padding: 3px; border-radius: 10px; border: 1px solid var(--tn-line); }
.tn-tabs button { border: 0; background: transparent; padding: 6px 14px; border-radius: 8px; font: inherit; font-size: 14px; font-weight: 600; color: var(--tn-muted); cursor: pointer; }
.tn-tabs button.is-on { background: var(--tn-bg); color: var(--tn-brand); box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }

/* editable rows */
.tn-rows { margin-top: 16px; }
.tn-rows-head, .tn-row { display: flex; gap: 8px; align-items: center; }
.tn-rows-head { font-size: 12px; font-weight: 700; color: var(--tn-muted); text-transform: uppercase; letter-spacing: .03em; padding: 0 2px 6px; }
.tn-row { margin-bottom: 8px; }
.tn-row > span { min-width: 0; }
.tn-row input, .tn-row select { min-height: 40px !important; padding: 7px 10px !important; }
.tn-rm-sp { width: 36px; flex: none !important; }
.tn-rm { flex: none; width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--tn-line); background: var(--tn-bg); color: var(--tn-muted); font-size: 20px; line-height: 1; cursor: pointer; padding: 0; }
.tn-rm:hover { color: var(--tn-bad); border-color: var(--tn-bad); }
.tn-add { margin-top: 4px; min-height: 38px; }
.tn-more { margin-top: 14px; }
.tn-more summary { cursor: pointer; font-weight: 600; color: var(--tn-brand); font-size: 14px; margin-bottom: 10px; }

/* file tools */
.tn-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; padding: 34px 20px; border: 2px dashed #b9c3d1; border-radius: 14px; background: var(--tn-soft); cursor: pointer; margin: 16px 0; transition: border-color .15s, background .15s; }
.tn-drop:hover, .tn-drop.is-over { border-color: var(--tn-brand); background: var(--tn-brand-soft); }
.tn-drop-icon { width: 46px; height: 46px; border-radius: 50%; background: var(--tn-brand); color: #fff; display: grid; place-items: center; font-size: 22px; margin-bottom: 6px; }
.tn-drop strong { color: var(--tn-ink); font-size: 17px; }
.tn-files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tn-files li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--tn-line); border-radius: 10px; background: var(--tn-bg); margin: 0; }
.tn-file-thumb { width: 42px; height: 42px; flex: none; border-radius: 6px; background: var(--tn-soft); display: grid; place-items: center; overflow: hidden; font-size: 20px; }
.tn-file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tn-file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: var(--tn-ink); }
.tn-file-name small { display: block; }
.tn-file-act { display: flex; gap: 4px; }
.tn-file-act button { width: 32px; height: 32px; border: 1px solid var(--tn-line); border-radius: 8px; background: var(--tn-bg); cursor: pointer; color: var(--tn-text); padding: 0; }
.tn-file-act button:disabled { opacity: .35; cursor: default; }
.tn-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 12px; }
.tn-thumbs figure { margin: 0; border: 1px solid var(--tn-line); border-radius: 10px; overflow: hidden; background: var(--tn-soft); }
.tn-thumbs img { display: block; width: 100%; height: auto; }
.tn-thumbs figcaption { font-size: 12px; padding: 6px 8px; color: var(--tn-muted); }
.tn-zipbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 0; }
.tn-mini { width: 28px; height: 28px; object-fit: cover; border-radius: 4px; vertical-align: middle; margin-right: 6px; }
.tn-crop { position: relative; display: inline-block; max-width: 100%; margin-top: 12px; user-select: none; touch-action: none; line-height: 0; }
.tn-crop img { max-width: 100%; max-height: 70vh; display: block; }
.tn-crop-box { position: absolute; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .5); cursor: move; outline: 1px dashed var(--tn-brand); }
.tn-crop-h { position: absolute; right: -9px; bottom: -9px; width: 18px; height: 18px; background: var(--tn-brand); border: 2px solid #fff; border-radius: 50%; cursor: nwse-resize; }
.tn-docprev { max-height: 420px; overflow: auto; border: 1px solid var(--tn-line); border-radius: 10px; padding: 16px; background: var(--tn-soft); font-size: 14px; }
.tn-pg { background: #fff; padding: 16px 20px; margin-bottom: 12px; border-radius: 6px; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.tn-pg small { display: block; margin-bottom: 8px; font-weight: 700; }

/* paper (word→pdf, invoice, payslip) */
.tn-paper { background: #fff; color: #1f2937; border: 1px solid var(--tn-line); border-radius: 8px; padding: 32px; font-size: 14px; line-height: 1.6; overflow-x: auto; }
.tn-paper img { max-width: 100%; height: auto; }
.tn-paper table { border-collapse: collapse; }
.tn-paper td, .tn-paper th { border: 1px solid #d1d5db; padding: 4px 8px; }
.tn-docb { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 24px; align-items: start; }
.tn-docb-prev { position: sticky; top: 16px; }
.tn-docb-prev .tn-actions { margin-top: 0; }
.tn-docb fieldset { border: 1px solid var(--tn-line); border-radius: 12px; padding: 14px 16px 16px; margin: 0 0 14px; min-width: 0; }
.tn-docb legend { font-weight: 700; color: var(--tn-ink); padding: 0 6px; font-size: 14px; }
@media (max-width: 900px) { .tn-docb { grid-template-columns: minmax(0, 1fr); } .tn-docb-prev { position: static; } }
.tn-doc { padding: 28px; }
.tn-inv { font-size: 13px; color: #1f2937; }
.tn-inv h1 { font-size: 26px; letter-spacing: .08em; margin: 0 0 6px; color: #4f46e5; }
.tn-inv h2 { font-size: 18px; margin: 4px 0; color: #111827; }
.tn-inv p { margin: 2px 0; }
.tn-inv-head { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 16px; border-bottom: 2px solid #4f46e5; }
.tn-inv-meta { text-align: right; }
.tn-logo { max-height: 60px; max-width: 180px; display: block; margin-bottom: 6px; }
.tn-inv-to { margin: 18px 0; }
.tn-inv-to small, .tn-inv-notes small { display: block; font-size: 11px; letter-spacing: .08em; font-weight: 700; color: #6b7280; }
.tn-inv-t { width: 100%; border-collapse: collapse; margin: 10px 0; }
.tn-paper .tn-inv-t th, .tn-paper .tn-inv-t td { border: 0; border-bottom: 1px solid #e5e7eb; padding: 8px 6px; text-align: left; }
.tn-paper .tn-inv-t th { background: #eef2ff; color: #4f46e5; font-size: 12px; text-transform: uppercase; }
.tn-inv-t td:not(:first-child), .tn-inv-t th:not(:first-child) { text-align: right !important; }
.tn-slip td:nth-child(3), .tn-slip th:nth-child(3) { text-align: left !important; }
.tn-inv-t .r { text-align: right !important; }
.tn-inv-t tr.b td { font-weight: 700; background: #f9fafb; }
.tn-inv-tot { margin-left: auto; width: min(320px, 100%); }
.tn-inv-tot p { display: flex; justify-content: space-between; padding: 4px 0; }
.tn-inv-tot p.g { border-top: 2px solid #111827; margin-top: 4px; padding-top: 8px; font-size: 15px; }
.tn-inv-notes { margin-top: 24px; padding-top: 12px; border-top: 1px solid #e5e7eb; }
.tn-paper .tn-kv { width: 100%; margin: 16px 0; }
.tn-paper .tn-kv td { border: 1px solid #e5e7eb; padding: 6px 8px; }
.tn-paper .tn-kv td:nth-child(odd) { color: #6b7280; width: 18%; }
.tn-net { margin-top: 16px; padding: 14px 16px; background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 8px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; }
.tn-net span { font-weight: 700; }
.tn-net b { font-size: 20px; color: #4f46e5; }
.tn-net small { width: 100%; color: #374151; font-style: italic; }
.tn-sign { display: flex; justify-content: space-between; margin-top: 56px; }
.tn-sign span { border-top: 1px solid #9ca3af; padding-top: 4px; width: 40%; text-align: center; color: #6b7280; font-size: 12px; }
.tn-fine { text-align: center; font-size: 11px; color: #9ca3af; margin-top: 20px; }

/* text tools */
.tn-text { min-height: 220px; font-size: 16px; }
.tn-kw { display: flex; flex-wrap: wrap; gap: 8px; }
.tn-kw span { background: var(--tn-brand-soft); color: var(--tn-brand-2); border-radius: 99px; padding: 4px 12px; font-size: 13px; }
.tn-kw small { color: var(--tn-brand); }
.tn-limits { display: grid; gap: 10px; }
.tn-limits span { display: flex; justify-content: space-between; font-size: 13px; }
.tn-limits i { display: block; height: 6px; background: var(--tn-soft); border-radius: 99px; overflow: hidden; margin-top: 4px; }
.tn-limits em { display: block; height: 100%; background: var(--tn-brand); }
.tn-limits em.over { background: var(--tn-bad); }
.tn-cite { padding: 16px 18px; background: var(--tn-soft); border-left: 4px solid var(--tn-brand); border-radius: 8px; font-family: Georgia, "Times New Roman", serif; font-size: 16px; padding-left: 2.6em; text-indent: -1.6em; color: var(--tn-ink); }

/* time zones */
.tn-tz { display: grid; gap: 8px; margin-top: 14px; }
.tn-tz-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--tn-line); border-radius: 10px; border-left: 4px solid var(--tn-c3); }
.tn-tz-row.work { border-left-color: var(--tn-good); }
.tn-tz-row.night { background: var(--tn-soft); }
.tn-tz-row > span:first-child { flex: 1; min-width: 0; }
.tn-tz-row small { display: block; font-size: 12px; }
.tn-tz-time { text-align: right; font-size: 20px; font-weight: 700; color: var(--tn-ink); font-variant-numeric: tabular-nums; }
.tn-tz-time small { font-weight: 500; }

/* info / FAQ / related */
.tn-info { margin: 8px 0 32px; }
.tn-info h2 { font-size: 22px; margin: 28px 0 10px; }
.tn-info h3 { font-size: 17px; margin: 18px 0 8px; }
.tn-formula { font-family: var(--tn-mono); font-size: 14px; background: var(--tn-soft); border: 1px solid var(--tn-line); border-radius: 10px; padding: 12px 14px; overflow-x: auto; }
.tn-faqs { display: grid; gap: 8px; }
.tn-faq { border: 1px solid var(--tn-line); border-radius: 10px; padding: 0 16px; background: var(--tn-bg); }
.tn-faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; color: var(--tn-ink); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.tn-faq summary::-webkit-details-marker { display: none; }
.tn-faq summary::after { content: "+"; color: var(--tn-brand); font-size: 20px; line-height: 1; }
.tn-faq[open] summary::after { content: "−"; }
.tn-faq p { margin: 0 0 14px; color: var(--tn-text); }
.tn-related h2 { font-size: 20px; margin: 0 0 14px; }

/* tool cards (coloured by category through --c) */
.tn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.tn-card { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 16px; border: 1px solid var(--tn-line); border-radius: 16px; background: var(--tn-bg); text-decoration: none !important; color: var(--tn-text); transition: border-color .15s, transform .15s, box-shadow .15s; }
.tn-card:hover { border-color: var(--c); transform: translateY(-2px); box-shadow: 0 12px 26px -16px var(--c); }
.tn-card-icon { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--c); background: color-mix(in srgb, var(--c) 13%, #fff); display: grid; place-items: center; font-size: 21px; font-weight: 800; color: var(--c); }
.tn-card-body { display: flex; flex-direction: column; min-width: 0; }
.tn-card strong { color: var(--tn-ink); font-size: 15.5px; line-height: 1.3; }
.tn-card:hover strong { color: var(--c); }
.tn-card small { font-size: 13px; line-height: 1.45; margin-top: 3px; color: var(--tn-muted); }

/* home: hero */
.tn-hero { position: relative; overflow: hidden; isolation: isolate; border-radius: 28px; background: var(--tn-grad); color: #fff; padding: clamp(36px, 6vw, 64px) clamp(18px, 4vw, 48px); text-align: center; }
.tn-hero::before, .tn-hero::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(2px); }
.tn-hero::before { width: 380px; height: 380px; right: -110px; top: -150px; background: radial-gradient(circle, rgba(244, 114, 182, .55), transparent 65%); }
.tn-hero::after { width: 420px; height: 420px; left: -160px; bottom: -220px; background: radial-gradient(circle, rgba(34, 211, 238, .45), transparent 65%); }
.tn-hero-in { max-width: 760px; margin: 0 auto; }
.tn-eyebrow { display: inline-block; margin: 0 0 16px; padding: 6px 14px; border-radius: 99px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28); font-size: 13.5px; font-weight: 600; }
.tn-eyebrow b { color: #fde68a; }
.tn .tn-hero-title { color: #fff; font-size: clamp(28px, 4.4vw, 46px); line-height: 1.1; margin: 0 auto 14px; max-width: 22ch; letter-spacing: -.03em; font-weight: 800; text-wrap: balance; }
.tn-hero-sub { color: rgba(255, 255, 255, .88); margin: 0 auto 26px; font-size: clamp(16px, 2vw, 18.5px); max-width: 56ch; }
.tn-search { position: relative; max-width: 640px; margin: 0 auto; text-align: left; }
.tn-search input { min-height: 60px !important; font-size: 17px !important; padding: 12px 20px 12px 54px !important; border-radius: 16px !important; border: 0 !important; color: var(--tn-ink) !important; box-shadow: 0 18px 40px -16px rgba(15, 23, 42, .55) !important; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%234f46e5' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='9.5' cy='9.5' r='7'/%3E%3Cpath d='m15 15 5.5 5.5'/%3E%3C/svg%3E") no-repeat 18px center !important; }
.tn-search input:focus { box-shadow: 0 0 0 4px rgba(255, 255, 255, .45), 0 18px 40px -16px rgba(15, 23, 42, .55) !important; }
.tn-search-results { position: absolute; z-index: 50; left: 0; right: 0; top: calc(100% + 8px); background: var(--tn-bg); border: 1px solid var(--tn-line); border-radius: 14px; box-shadow: 0 24px 48px -16px rgba(15, 23, 42, .35); overflow: hidden; text-align: left; }
.tn-search-results:empty { display: none; }
.tn-search-results a { display: flex; gap: 10px; align-items: center; padding: 12px 16px; text-decoration: none; color: var(--tn-ink); border-bottom: 1px solid var(--tn-line); }
.tn-search-results a:last-child { border-bottom: 0; }
.tn-search-results a:hover, .tn-search-results a.is-on { background: var(--tn-brand-soft); }
.tn-search-results p { padding: 12px 16px; margin: 0; color: var(--tn-muted); }
.tn-popular { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 18px; font-size: 14px; }
.tn-popular span { color: rgba(255, 255, 255, .8); font-weight: 600; }
.tn .tn-popular a { color: #fff; text-decoration: none; padding: 5px 12px; border-radius: 99px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); transition: background .15s; }
.tn .tn-popular a:hover { background: rgba(255, 255, 255, .26); }

/* home: section heads + category tiles */
.tn-sec-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 16px; }
.tn-sec-head h2 { display: flex; align-items: center; gap: 10px; font-size: clamp(20px, 2.6vw, 24px); margin: 0; letter-spacing: -.01em; }
.tn-sec-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; font-size: 18px; background: var(--c); background: color-mix(in srgb, var(--c) 14%, #fff); }
.tn .tn-sec-head a { flex: none; font-size: 14px; font-weight: 700; text-decoration: none; color: var(--c); padding: 7px 14px; border-radius: 99px; background: color-mix(in srgb, var(--c) 10%, #fff); }
.tn .tn-sec-head a:hover { background: color-mix(in srgb, var(--c) 18%, #fff); }
.tn-cats { margin-top: 40px; }
.tn-catgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.tn-cat { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 18px; text-decoration: none !important; color: var(--tn-ink) !important; background: var(--c); background: linear-gradient(135deg, color-mix(in srgb, var(--c) 12%, #fff), color-mix(in srgb, var(--c) 4%, #fff)); border: 1px solid color-mix(in srgb, var(--c) 22%, #fff); transition: transform .15s, box-shadow .15s; }
.tn-cat:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -18px var(--c); }
.tn-cat-icon { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--c); font-size: 23px; box-shadow: 0 8px 18px -10px var(--c); }
.tn-cat-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tn-cat-body strong { font-size: 16px; line-height: 1.25; }
.tn-cat-body small { color: var(--c); font-weight: 700; font-size: 13px; }
.tn-cat-go { color: var(--c); font-weight: 800; font-size: 18px; transition: transform .15s; }
.tn-cat:hover .tn-cat-go { transform: translateX(3px); }
.tn-cat-section { margin-top: 44px; scroll-margin-top: 90px; }

/* "search all" tile */
.tn-cat-all { --c: #7c3aed; background: var(--tn-grad) !important; border-color: transparent !important; color: #fff !important; }
.tn-cat-all .tn-cat-icon { background: rgba(255, 255, 255, .2); box-shadow: none; }
.tn-cat-all .tn-cat-body small, .tn-cat-all .tn-cat-go { color: rgba(255, 255, 255, .85); }

/* phones: keep the homepage short */
@media (max-width: 600px) {
  .tn-hero { border-radius: 22px; }
  .tn-popular a:nth-child(n+6) { display: none; }
  .tn-eyebrow { font-size: 12px; padding: 5px 12px; }
  .tn-catgrid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tn-cat { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; }
  .tn-cat-icon { width: 42px; height: 42px; font-size: 20px; border-radius: 12px; }
  .tn-cat-body strong { font-size: 15px; }
  .tn-cat-go { display: none; }
  .tn-home .tn-cat-section .tn-card:nth-child(n+5) { display: none; }
  .tn-home .tn-card small { display: none; }
  .tn-home .tn-card { align-items: center; padding: 12px 14px; }
  .tn-home .tn-card-icon { width: 38px; height: 38px; font-size: 18px; }
  .tn-sec-head h2 { font-size: 19px; }
  .tn .tn-sec-head a { padding: 6px 11px; font-size: 13px; }
}

/* tool page accents */
.tn-tool-page .tn-tool { border-top: 4px solid var(--c); }
.tn-category .tn-grid { margin-top: 4px; }
@media (prefers-reduced-motion: reduce) { .tn-card, .tn-cat, .tn-cat-go { transition: none; } .tn-card:hover, .tn-cat:hover { transform: none; } }

@media (max-width: 600px) {
  .tn-tool { padding: 16px; border-radius: 14px; }
  .tn-form { grid-template-columns: 1fr 1fr; gap: 12px; }
  .tn-stats { grid-template-columns: 1fr 1fr; }
  .tn-paper { padding: 18px; }
  .tn-tz-time { font-size: 17px; }
}
@media (max-width: 380px) { .tn-form { grid-template-columns: 1fr; } }

@media print {
  body.tn-print .tn-paper { border: 0; padding: 0; }
}
.tn-docb .tn-form { align-items: start; }

/* homepage about + FAQ */
.tn-about { margin-top: 56px; padding: clamp(22px, 4vw, 36px); border-radius: 22px; background: var(--tn-bg); border: 1px solid var(--tn-line); max-width: 78ch; font-size: 16.5px; }
.tn-about h2 { font-size: 24px; margin: 0 0 14px; letter-spacing: -.01em; }
.tn-about h3 { font-size: 18px; margin: 22px 0 8px; }
.tn-about p { margin: 0 0 14px; }
.tn-home-faq { max-width: 78ch; margin-top: 12px; }

/* ---------- v1.2: date & time ---------- */
.tn-cdbox { margin-top: 14px; }
.tn-cd-label { font-size: 13px; font-weight: 700; color: var(--tn-muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.tn-cd { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tn-cd span { background: var(--tn-ink); color: #fff; border-radius: 12px; padding: 14px 6px; text-align: center; display: flex; flex-direction: column; }
.tn-cd b { font-size: clamp(26px, 6vw, 44px); line-height: 1; font-variant-numeric: tabular-nums; font-weight: 800; }
.tn-cd small { color: rgba(255, 255, 255, .75); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; margin-top: 6px; }
.tn-cd-done { font-size: 22px; font-weight: 800; color: var(--tn-brand); margin: 0; }
.tn-progress { height: 10px; border-radius: 99px; background: var(--tn-soft); border: 1px solid var(--tn-line); overflow: hidden; margin-top: 14px; }
.tn-progress i { display: block; height: 100%; background: var(--tn-brand); transition: width .3s; }
.tn-bigclock { font-size: clamp(54px, 13vw, 104px); font-weight: 800; text-align: center; color: var(--tn-ink); font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.1; margin: 18px 0 6px; }
.tn-bigclock small { font-size: .45em; color: var(--tn-muted); }
.tn-bigclock.is-done { color: var(--tn-bad); animation: tn-blink 1s steps(2) infinite; }
@keyframes tn-blink { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .tn-bigclock.is-done { animation: none; } }
.tn-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tn-presets .tn-btn { min-height: 36px; padding: 6px 12px; font-size: 13px; }
.tn-center { justify-content: center; }
.tn-laps { max-width: 520px; margin: 0 auto; }
.tn-good { color: var(--tn-good); font-weight: 700; }
.tn .tn-today td { background: var(--tn-brand-soft) !important; font-weight: 700; }
.tn-cal { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.tn-cal-m b { display: block; color: var(--tn-ink); margin-bottom: 6px; }
.tn-cal-g { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; font-size: 12.5px; text-align: center; font-variant-numeric: tabular-nums; }
.tn-cal-g i { font-style: normal; color: var(--tn-muted); font-size: 11px; font-weight: 700; padding: 3px 0; }
.tn-cal-g i.wk { color: var(--tn-c3); font-weight: 500; }
.tn-cal-g span { padding: 4px 0; border-radius: 6px; }
.tn-cal-g span.we { color: var(--tn-muted); }
.tn-cal-g span.hol, .tn-key.hol { background: #fde68a; color: #78350f; font-weight: 700; }
.tn-cal-g span.today, .tn-key.today { outline: 2px solid var(--tn-brand); font-weight: 800; }
.tn-key { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-left: 4px; }
.tn-weeks { display: block; margin-top: 14px; max-width: 100%; }
.tn-share { display: flex; gap: 8px; margin-top: 14px; }
.tn-share input { flex: 1; min-width: 0; }

/* ---------- islamic ---------- */
.tn-prayers { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 14px; }
.tn-prayer { border: 1px solid var(--tn-line); border-radius: 12px; padding: 12px 14px; background: var(--tn-bg); display: flex; flex-direction: column; }
.tn-prayer span { font-size: 13px; font-weight: 700; color: var(--tn-muted); }
.tn-prayer b { font-size: 22px; color: var(--tn-ink); font-variant-numeric: tabular-nums; }
.tn-prayer.is-next { border-color: var(--tn-brand); background: var(--tn-brand-soft); box-shadow: 0 0 0 2px var(--tn-brand) inset; }
.tn-prayer.is-sun { opacity: .75; }
.tn-qibla { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: center; }
@media (max-width: 560px) { .tn-qibla { grid-template-columns: 1fr; justify-items: center; } }
.tn-compass { width: 220px; height: 220px; }
.tn-compass .ring { fill: var(--tn-soft); stroke: var(--tn-line); stroke-width: 3; }
.tn-compass text { fill: var(--tn-muted); font: 700 15px var(--tn-font); }
.tn-compass .needle { stroke: var(--tn-brand); stroke-width: 5; stroke-linecap: round; }
.tn-compass .tip { fill: var(--tn-brand); }
.tn-compass .hub { fill: var(--tn-ink); }
.tn-compass .kaaba { font-size: 20px; }
.tn-tap { --p: 0%; display: grid; place-items: center; align-content: center; width: min(260px, 70vw); aspect-ratio: 1; margin: 20px auto; border-radius: 50%; border: 0; cursor: pointer; color: #fff; font: inherit;
  background: conic-gradient(var(--tn-accent) var(--p), transparent 0) border-box, var(--tn-grad); box-shadow: inset 0 0 0 12px rgba(255, 255, 255, .12), 0 16px 40px -18px rgba(79, 70, 229, .9); -webkit-tap-highlight-color: transparent; user-select: none; }
.tn-tap:active { transform: scale(.98); }
.tn-tap.is-round { box-shadow: 0 0 0 8px var(--tn-accent); }
.tn-tap-n { font-size: clamp(56px, 16vw, 84px); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.tn-tap-of { color: rgba(255, 255, 255, .8); font-size: 15px; }

/* ---------- shipping ---------- */
.tn-drawwrap { margin-top: 14px; border: 1px solid var(--tn-line); border-radius: 10px; padding: 10px; background: #fff; overflow-x: auto; }
.tn-drawwrap svg { display: block; min-width: 480px; height: auto; }
.tn-code-out { display: flex; justify-content: center; padding: 18px; background: #fff; border: 1px solid var(--tn-line); border-radius: 12px; margin-top: 4px; overflow-x: auto; }
.tn-code-out svg { max-width: 100%; height: auto; }
.tn-label4x6 { width: 384px; max-width: 100%; min-height: 576px; margin: 0 auto; border: 2px solid #111; color: #111; font-family: Arial, sans-serif; display: flex; flex-direction: column; }
.tn-label4x6 small { display: block; font-size: 10px; font-weight: 700; letter-spacing: .08em; color: #333; }
.tn-label4x6 p { margin: 2px 0 0; }
.tl-row { padding: 10px 12px; border-bottom: 2px solid #111; font-size: 12px; }
.tl-to { padding: 12px; border-bottom: 2px solid #111; font-size: 18px; font-weight: 700; line-height: 1.35; flex: 1; }
.tl-meta { display: flex; border-bottom: 2px solid #111; }
.tl-meta span { flex: 1; padding: 8px 12px; border-right: 2px solid #111; }
.tl-meta span:last-child { border-right: 0; }
.tl-meta b { font-size: 16px; }
.tl-bc { padding: 14px 12px; text-align: center; border-bottom: 2px solid #111; }
.tl-bc svg { max-width: 100%; height: auto; }
.tl-note { padding: 8px 12px; font-weight: 700; text-align: center; font-size: 13px; }

/* ---------- long-form SEO content ---------- */
.tn-article { max-width: 860px; margin: 8px 0 40px; font-size: 16.5px; line-height: 1.75; color: var(--tn-text); }
.tn-article h2 { font-size: clamp(21px, 2.4vw, 26px); margin: 40px 0 12px; letter-spacing: -.015em; }
.tn-article h2:first-child { margin-top: 8px; }
.tn-article h3 { font-size: 18px; margin: 22px 0 6px; }
.tn-article p { margin: 0 0 14px; }
.tn-article ul, .tn-article ol { margin: 0 0 16px; padding-left: 22px; }
.tn-article li { margin: 6px 0; }
.tn-article a { color: var(--c, var(--tn-brand)); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.tn-article a:hover { text-decoration-thickness: 2px; }
.tn-article strong { color: var(--tn-ink); }
.tn-article .tn-table-wrap { margin: 6px 0 18px; }
.tn-steps { counter-reset: st; list-style: none; padding-left: 0 !important; display: grid; gap: 10px; }
.tn-steps li { counter-increment: st; position: relative; padding: 12px 14px 12px 54px; margin: 0 !important; background: var(--tn-bg); border: 1px solid var(--tn-line); border-radius: 14px; }
.tn-steps li::before { content: counter(st); position: absolute; left: 12px; top: 10px; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #fff; background: var(--c, var(--tn-brand)); }
.tn-article .tn-formula { font-size: 15px; }
.tn-faq summary h3 { display: inline; font-size: 16.5px; margin: 0; color: var(--tn-ink); font-weight: 700; line-height: 1.4; }
.tn-faq-a p { margin: 0 0 14px; }
.tn-pillar { display: grid; gap: 14px; margin: 6px 0 10px; }
.tn-pillar-item { padding: 16px 18px; border-radius: 16px; background: var(--tn-bg); border: 1px solid var(--tn-line); border-left: 4px solid var(--c); }
.tn-pillar-item h3 { margin: 0 0 6px; font-size: 18px; }
.tn-pillar-item h3 a { color: var(--tn-ink) !important; text-decoration: none !important; }
.tn-pillar-item h3 a:hover { color: var(--c) !important; }
.tn-pillar-item p { margin: 0 0 8px; }
.tn-pillar-item p:last-child { margin: 0; }
.tn-kw-line small { color: var(--tn-muted); }
.tn-article .tn-more { font-size: 14.5px; text-decoration: none; }
.tn-pillar-body { max-width: 900px; margin-top: 36px; }
.tn-home-guide { margin-top: 48px; }
.tn-category .tn-related { margin-top: 20px; }

/* Guides lists on tool, category and home pages */
.tn-guides { margin-top: 28px; }
.tn-guides h2 { font-size: clamp(20px, 2.4vw, 24px); }
.cc-guide-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.cc-guide-list li { margin: 0; }
.cc-guide-list a { display: block; height: 100%; padding: 12px 14px; border: 1px solid var(--tn-line, #e2e8f0); border-radius: 14px; background: #fff; color: #0f172a; text-decoration: none; font-weight: 600; font-size: 15px; line-height: 1.4; }
.cc-guide-list a:hover { border-color: var(--c, #4f46e5); color: var(--c, #4f46e5); }
