/* Form 5472 deadline & penalty checker (tool-5472.php). Dark hero in the service-page (v3) palette, light tool cards. */
.t5-page { --ink: #1A1530; --night: #120C26; --night-2: #1B1438; --violet: #7C41D8; --violet-2: #9B6BEB; --lav: #C9B3F7; --signal: #3EE6A8;
  --paper: #F6F4FB; --mist: #B6AECF; --line: rgba(26, 21, 48, .1); --late: #E5484D; --soon: #F5A524;
  --display: 'Archivo', system-ui, sans-serif; --body: 'Public Sans', system-ui, sans-serif; --typed: 'Courier Prime', 'Courier New', monospace;
  margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.6 var(--body); }
.t5-page[dir="rtl"], [dir="rtl"] .t5-page, html[lang="ar"] .t5-page { --body: 'IBM Plex Sans Arabic', 'Public Sans', system-ui, sans-serif; --display: 'Alexandria', 'Archivo', system-ui, sans-serif; }
.t5-page *, .t5-page *::before, .t5-page *::after { box-sizing: border-box; }
.t5-wrap { max-width: 1140px; margin-inline: auto; padding-inline: 20px; }
.t5-main h1, .t5-main h2, .t5-main h3, .t5-main p { margin: 0; }

/* hero */
.t5-hero { position: relative; overflow: hidden; padding: 150px 0 120px; color: #fff;
  background: radial-gradient(60% 80% at 85% 10%, rgba(124, 65, 216, .55), transparent 70%), radial-gradient(40% 60% at 5% 100%, rgba(62, 230, 168, .16), transparent 70%), var(--night); }
.t5-hero::after { content: ''; position: absolute; inset-inline-end: -120px; top: -140px; width: 420px; height: 420px; border-radius: 50%; background: var(--violet); opacity: .35; pointer-events: none; }
.t5-eyebrow { display: inline-flex; gap: .55em; align-items: center; font: 700 .78rem/1.3 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--signal); }
.t5-eyebrow::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 4px rgba(62, 230, 168, .22); }
html[lang="ar"] .t5-eyebrow { letter-spacing: 0; text-transform: none; font-size: .95rem; }
.t5-h1 { position: relative; z-index: 1; margin-top: 1rem !important; max-width: 17ch; font: 900 clamp(2.3rem, 5.4vw, 4.4rem)/1 var(--display); font-stretch: 125%; letter-spacing: -.035em; }
html[lang="ar"] .t5-h1 { font-stretch: normal; letter-spacing: 0; line-height: 1.25; font-weight: 800; }
.t5-lede { position: relative; z-index: 1; margin-top: 1.3rem !important; max-width: 52ch; font-size: clamp(1.02rem, 1.5vw, 1.2rem); color: var(--mist); }

/* tool */
.t5-tool { margin-top: -78px; position: relative; z-index: 2; padding-bottom: 40px; }
.t5-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 20px; align-items: start; }
.t5-card { background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: clamp(20px, 3vw, 32px); box-shadow: 0 40px 80px -50px rgba(26, 21, 48, .45); }
.t5-q { border: 0; margin: 0 0 22px; padding: 0; min-width: 0; }
.t5-q legend { display: flex; align-items: center; gap: 10px; font: 700 1.05rem/1.35 var(--body); margin-bottom: 12px; padding: 0; }
.t5-n { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--violet); color: #fff; font: 800 .85rem/1 var(--body); }
.t5-opt { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; margin-top: 8px; cursor: pointer; transition: border-color .15s, background .15s; }
.t5-opt:hover { border-color: var(--violet-2); }
.t5-opt input { margin: 4px 0 0; accent-color: var(--violet); flex: none; }
.t5-opt:has(input:checked) { border-color: var(--violet); background: rgba(124, 65, 216, .06); }
.t5-opt--inline { display: inline-flex; margin-inline-end: 8px; }
.t5-row { display: flex; gap: 12px; flex-wrap: wrap; }
.t5-sel { display: grid; gap: 6px; flex: 1 1 140px; font-size: .85rem; color: #5b5470; }
.t5-sel select { appearance: none; width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237C41D8' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right 14px center; font: 600 1rem var(--body); color: var(--ink); }
[dir="rtl"] .t5-sel select { background-position: left 14px center; }
.t5-hint { font-size: .88rem; color: #6b6480; margin: -4px 0 6px !important; }
.t5-years { display: flex; flex-wrap: wrap; gap: 8px; }
.t5-years:empty::before { content: '—'; color: #aaa; }
.t5-year { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font: 700 .95rem var(--typed); }
.t5-year input { accent-color: var(--violet); margin: 0; }
.t5-year:has(input:checked) { border-color: var(--signal); background: rgba(62, 230, 168, .12); }
.t5-ext { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: #FFF8EC; }
.t5-ext p { font-weight: 600; margin-bottom: 6px !important; }
.t5-btn { display: inline-flex; justify-content: center; width: 100%; padding: 15px 22px; border: 0; border-radius: 999px; background: var(--violet); color: #fff; font: 700 1rem var(--body); cursor: pointer; box-shadow: 0 16px 30px -16px rgba(124, 65, 216, .9); transition: background .15s, transform .15s; }
.t5-btn:hover { background: #6a32c4; transform: translateY(-1px); }

/* result */
.t5-result { position: sticky; top: 96px; min-height: 260px; background: var(--night-2); color: #fff; border-color: transparent; }
.t5-wait { color: var(--mist); }
.t5-r-k { font: 700 .75rem/1.3 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--lav); }
html[lang="ar"] .t5-r-k { letter-spacing: 0; font-size: .9rem; }
.t5-r-date { margin-top: .4rem !important; font: 900 clamp(1.8rem, 3.6vw, 2.6rem)/1.05 var(--display); font-stretch: 112%; }
html[lang="ar"] .t5-r-date { font-stretch: normal; }
.t5-r-sub { color: var(--mist); font-size: .92rem; margin-top: .3rem !important; }
.t5-count { display: inline-block; margin-top: .8rem; padding: .35em .9em; border-radius: 999px; background: rgba(62, 230, 168, .16); color: var(--signal); font: 700 .9rem var(--body); }
.t5-count.is-soon { background: rgba(245, 165, 36, .18); color: var(--soon); }
.t5-r-sec { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid rgba(255, 255, 255, .1); }
.t5-ylist { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: 6px; }
.t5-ylist li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, .05); font-size: .92rem; }
.t5-ylist b { font-family: var(--typed); }
.t5-st { font-weight: 700; }
.t5-st--filed { color: var(--signal); } .t5-st--due, .t5-st--ext { color: var(--soon); } .t5-st--late { color: #ff8a8e; }
.t5-risk { margin-top: .5rem !important; font: 800 1.15rem/1.35 var(--body); }
.t5-risk.is-late { color: #ff8a8e; }
.t5-small { margin-top: .5rem !important; font-size: .85rem; color: var(--mist); }
.t5-todo { margin: .6rem 0 0; padding-inline-start: 1.2em; color: #e9e4f7; font-size: .93rem; }
.t5-todo li + li { margin-top: .35rem; }
.t5-ctas { display: grid; gap: 10px; margin-top: 1.4rem; }
.t5-ctas a { display: inline-flex; justify-content: center; padding: 13px 18px; border-radius: 999px; font-weight: 700; text-decoration: none; }
.t5-cta1 { background: var(--signal); color: var(--night) !important; }
.t5-cta2 { border: 1px solid rgba(255, 255, 255, .25); color: #fff !important; }
.t5-msg { color: #e9e4f7; }
.t5-note { margin-top: 18px !important; font-size: .82rem; color: #6b6480; max-width: 80ch; }

/* how + faq */
.t5-how { padding: 64px 0 24px; }
.t5-h2 { font: 900 clamp(1.6rem, 3vw, 2.3rem)/1.1 var(--display); font-stretch: 112%; letter-spacing: -.02em; }
html[lang="ar"] .t5-h2 { font-stretch: normal; letter-spacing: 0; line-height: 1.35; font-weight: 800; }
.t5-how__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-top: 24px; }
.t5-how__grid article { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 22px; }
.t5-how__grid h3 { margin: 12px 0 6px !important; font-size: 1.05rem; }
.t5-how__grid p { color: #4b4560; font-size: .95rem; }
.t5-faq { padding: 40px 0 80px; }
.t5-faq details { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 4px 20px; margin-top: 10px; }
.t5-faq details:first-of-type { margin-top: 22px; }
.t5-faq summary { cursor: pointer; list-style: none; padding: 14px 0; }
.t5-faq summary::-webkit-details-marker { display: none; }
.t5-faq summary h3 { display: inline; font-size: 1.02rem; }
.t5-faq summary::after { content: '+'; float: inline-end; color: var(--violet); font-weight: 800; }
.t5-faq details[open] summary::after { content: '−'; }
.t5-faq details p { padding-bottom: 16px; color: #4b4560; }

@media (max-width: 860px) {
  .t5-hero { padding: 120px 0 104px; }
  .t5-grid { grid-template-columns: minmax(0, 1fr); }
  .t5-result { position: static; }
}
@media (prefers-reduced-motion: reduce) { .t5-page * { transition: none !important; } }
