/* Redirect Rule Generator landing page only (/tools/redirect-rule-generator).
   The live generator sits right under the heading; ids are shared with /assets/tools/redirect-rule-generator.js. */

.tp-rr{--rr-ink:#071b35;--rr-muted:#52647b;--rr-line:#d7e1ee;--rr-blue:#1f5cf0;--rr-blue-dark:#1647c4;--rr-mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.tp-rr.mt-public{padding-top:clamp(20px,3.2vw,44px)}

/* heading row */
.tp-rr-hero{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px clamp(24px,4vw,56px);align-items:end;margin:0 0 22px}
.tp-rr-intro{min-width:0}
.tp-rr-intro h1{margin:10px 0 12px;font-size:clamp(1.9rem,3.2vw,3rem);line-height:1.06;letter-spacing:-.04em;max-width:22ch;overflow-wrap:anywhere}
.tp-rr-lede{margin:0;max-width:62ch;color:var(--rr-muted);font-size:1.05rem;line-height:1.6}
.tp-rr-side{display:flex;flex-direction:column;align-items:flex-start;gap:6px;min-width:0}
.tp-rr-price{display:flex;flex-direction:column;gap:2px;margin:0;padding:10px 14px;border:1px solid var(--rr-line);border-radius:12px;background:#fff}
.tp-rr-price b{font-size:1.02rem;color:var(--rr-ink)}
.tp-rr-price span{color:var(--rr-muted);font-size:.88rem;font-weight:650}
.tp-rr-more{margin:0}
.tp-rr-more a{display:inline-flex;align-items:center;min-height:44px;color:var(--rr-blue);font-weight:800;text-underline-offset:3px}
.tp-rr-more a:focus-visible{outline:2px solid var(--rr-blue);outline-offset:2px}

/* generator */
.tp-rr-tool{border:1px solid #bfd0e5;border-radius:20px;background:#f4f7fb;box-shadow:0 22px 55px rgba(9,34,70,.12);padding:clamp(12px,1.6vw,18px);display:grid;gap:clamp(12px,1.6vw,18px)}
.tp-rr-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:clamp(12px,1.6vw,18px);align-items:stretch}
.tp-rr .bt-panel{min-width:0;margin:0;border-color:var(--rr-line);border-radius:14px;padding:18px}
.tp-rr .bt-panel h2{margin:0 0 12px;font-size:1.08rem;color:var(--rr-ink)}
.tp-rr .bt-panel label[for]{font-size:.84rem;font-weight:700;letter-spacing:0;color:var(--rr-muted)}
.tp-rr .bt-panel textarea{min-height:260px;border-color:var(--rr-line);background:#f7f9fc;color:var(--rr-ink);font-family:var(--rr-mono);font-size:.86rem;line-height:1.6}
.tp-rr .bt-panel input[type=text],.tp-rr .bt-panel input[type=url],.tp-rr .bt-panel select{min-height:44px;border-color:var(--rr-line);background:#f7f9fc;color:var(--rr-ink)}
.tp-rr .bt-panel input[type=text]{font-family:var(--rr-mono);font-size:.9rem}
.tp-rr .bt-panel select{font-weight:700;cursor:pointer}
.tp-rr .bt-panel textarea:focus-visible,.tp-rr .bt-panel input:focus-visible,.tp-rr .bt-panel select:focus-visible{outline:none;border-color:var(--rr-blue);box-shadow:0 0 0 3px rgba(31,92,240,.2)}
.tp-rr .bt-unit{color:var(--rr-muted);font-weight:650;margin-top:8px}
.tp-rr .bt-error[hidden],.tp-rr [hidden]{display:none}

.tp-rr-add{margin-top:14px}
.tp-rr-addrow{align-items:center}
.tp-rr-addrow>input{flex:1 1 120px}
.tp-rr-arrow{flex:0 0 auto;color:var(--rr-muted);font-weight:800}

.tp-rr-opts{margin-top:18px;padding-top:4px;border-top:1px solid var(--rr-line)}
.tp-rr-opts .bt-zone{margin-top:14px}
.tp-rr-opts .bt-zone legend{color:var(--rr-muted)}
.tp-rr-opts>label[for]{margin-top:14px}
.tp-rr .bt-panel .bt-radio,.tp-rr .bt-panel .bt-check{display:flex;align-items:center;min-height:40px;font-size:.92rem;font-weight:600;color:var(--rr-ink);margin:0;cursor:pointer;gap:10px;line-height:1.4}
.tp-rr .bt-radio input,.tp-rr .bt-check input{width:18px;height:18px;accent-color:var(--rr-blue)}
.tp-rr .bt-radio input:focus-visible,.tp-rr .bt-check input:focus-visible{outline:2px solid var(--rr-blue);outline-offset:2px}

.tp-rr-out{display:flex;flex-direction:column}
.tp-rr .bt-note{margin-top:10px;color:#2d3f57;line-height:1.5}
.tp-rr .bt-pre{flex:1 1 auto;min-height:300px;max-height:520px;margin-top:12px;border-color:#0d1b33;font-size:.8rem}
.tp-rr .bt-pre:focus-visible{outline:2px solid var(--rr-blue);outline-offset:2px}

/* buttons */
.tp-rr-btn{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;min-height:44px;min-width:72px;padding:0 18px;border:1px solid var(--rr-blue);border-radius:10px;background:var(--rr-blue);color:#fff;font:inherit;font-size:.92rem;font-weight:800;cursor:pointer;transition:background .15s,border-color .15s}
.tp-rr-btn:hover{background:var(--rr-blue-dark);border-color:var(--rr-blue-dark)}
.tp-rr-btn--ghost{background:#fff;color:var(--rr-ink);border-color:#b7c6da}
.tp-rr-btn--ghost:hover{background:#edf4ff;border-color:var(--rr-blue);color:var(--rr-ink)}
.tp-rr .bt-panel .tp-rr-btn:focus-visible{outline:2px solid var(--rr-ink);outline-offset:2px}
.tp-rr .bt-actions{margin-top:14px}

/* checks */
.tp-rr-chkhead{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px}
.tp-rr-chkhead h2{margin:0}
.tp-rr-chkhead .bt-unit{margin:0;flex:1 1 220px}
.tp-rr-tablewrap{overflow-x:auto}
.tp-rr .bt-table{margin-top:12px;min-width:520px}
.tp-rr .bt-table td{font-size:.84rem;line-height:1.45}
.tp-rr .bt-table td:first-child{font-family:inherit;white-space:nowrap}
.tp-rr .bt-table td{word-break:normal;overflow-wrap:anywhere}
.tp-rr .bt-table td:last-child{font-family:inherit}
.tp-rr-hint{margin:12px 0 0;font-size:.84rem;color:var(--rr-muted);line-height:1.5}

/* what you get */
.tp-rr-sub{margin:0 0 18px;max-width:64ch;color:var(--rr-muted);line-height:1.6}
.tp-rr-formats{margin:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,200px),1fr));gap:12px}
.tp-rr-formats>div{min-width:0;border:1px solid var(--rr-line);border-radius:12px;background:#fff;padding:14px 16px}
.tp-rr-formats dt{font-weight:800;color:var(--rr-ink);margin:0 0 4px}
.tp-rr-formats dd{margin:0;color:var(--rr-muted);font-size:.92rem;line-height:1.55;overflow-wrap:anywhere}
.tp-rr-formats dd.tp-rr-file{display:inline-block;margin:0 0 8px;padding:2px 8px;border-radius:6px;background:#0d1b33;color:#e6ecf7;font-family:var(--rr-mono);font-size:.8rem}
.tp-rr code{font-family:var(--rr-mono);font-size:.88em;overflow-wrap:anywhere}

/* checks list */
.tp-rr-list{margin:0;padding:0;list-style:none;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr));gap:10px 28px}
.tp-rr-list li{position:relative;padding-left:22px;line-height:1.55;color:var(--rr-muted)}
.tp-rr-list li::before{content:"";position:absolute;left:4px;top:.6em;width:8px;height:8px;border-radius:2px;background:var(--rr-blue)}
.tp-rr-list b{color:var(--rr-ink)}

/* link rows */
.tp-rr .mt-context-links{display:flex;flex-wrap:wrap;gap:4px 24px}
.tp-rr-related .related-tools-list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(260px,100%),1fr));gap:10px}
.tp-rr-related .related-tools-list li{margin:0}
.tp-rr-related .related-tools-list a{display:flex;align-items:center;min-height:48px;padding:10px 16px;border:1px solid var(--rr-line);border-radius:10px;background:#fff;color:var(--rr-ink);font-weight:700;text-decoration:none}
.tp-rr-related .related-tools-list a:hover{border-color:var(--rr-blue);color:var(--rr-blue)}
.tp-rr-related .related-tools-list a:focus-visible{outline:2px solid var(--rr-blue);outline-offset:2px}

@media (max-width:900px){
  .tp-rr-hero{grid-template-columns:minmax(0,1fr);align-items:start}
  .tp-rr-side{flex-direction:row;flex-wrap:wrap;align-items:center;gap:6px 16px}
  .tp-rr-grid{grid-template-columns:minmax(0,1fr)}
  .tp-rr .bt-panel textarea{min-height:220px}
  .tp-rr .bt-pre{min-height:240px}
}
@media (max-width:600px){
  .tp-rr-tool{border-radius:16px;padding:8px;margin:0 -8px}
  .tp-rr .bt-panel{padding:14px}
  .tp-rr-price{flex-direction:row;flex-wrap:wrap;gap:2px 10px}
  .tp-rr-addrow>input{flex:1 1 100%}
  .tp-rr-arrow{display:none}
  .tp-rr-addrow>.tp-rr-btn{flex:1 1 100%}
  .tp-rr .bt-table{min-width:0}
  .tp-rr .bt-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .tp-rr .bt-table tr{display:grid;grid-template-columns:auto minmax(0,1fr);gap:4px 12px;padding:10px 0;border-bottom:1px solid var(--rr-line)}
  .tp-rr .bt-table td{padding:0;border:0}
  .tp-rr .bt-table td:last-child{grid-column:1/-1}
}
@media (prefers-reduced-motion:reduce){
  .tp-rr *{transition:none}
}

/* editorial */
.tp-rr .mt-editorial p{max-width:76ch;line-height:1.65}
.tp-rr .mt-context-links a{color:var(--rr-blue);font-weight:700;text-underline-offset:3px}
.tp-rr .mt-context-links a:focus-visible{outline:2px solid var(--rr-blue);outline-offset:2px}
