/* tools-v1: the free calculators on /tools. Same Midday editorial surface as
   the academy and blog (loaded after blog-v1.css): Hedvig, charcoal, square
   corners, hairlines, no gradients, no shadows, weight 400. Every rule is
   scoped to the editorial attribute so no other page is touched. */
html[data-fx-editorial="midday"] .page-hero.fxt-hero{padding:118px 0 34px}
html[data-fx-editorial="midday"] .fxt-hero .editorial-topline{margin-bottom:26px}
html[data-fx-editorial="midday"] .fxt-hero h1{font-size:clamp(30px,3.5vw,46px);max-width:26ch}
html[data-fx-editorial="midday"] .fxt-hero .lead{max-width:72ch;margin-top:18px;font-size:17px}
html[data-fx-editorial="midday"] .fxt{padding:40px 0 72px;border-bottom:1px solid var(--p-border)}
html[data-fx-editorial="midday"] .fxt-wrap{max-width:1180px}
html[data-fx-editorial="midday"] .fxt-grid{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:24px;align-items:start}
html[data-fx-editorial="midday"] .fxt-card{border:1px solid var(--p-border);background:var(--p-bg);padding:28px}
html[data-fx-editorial="midday"] .fxt-form{display:grid;gap:28px;margin:0}
html[data-fx-editorial="midday"] .fxt-fs{border:0;border-top:1px solid var(--p-border);margin:0;padding:22px 0 0;min-width:0}
html[data-fx-editorial="midday"] .fxt-fs:first-child{border-top:0;padding-top:0}
html[data-fx-editorial="midday"] .fxt-fs legend{float:left;width:100%;padding:0;margin:0 0 16px;font-size:13px;color:var(--p-muted);line-height:1.5}
html[data-fx-editorial="midday"] .fxt-fs legend+*{clear:both}
html[data-fx-editorial="midday"] .fxt-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:14px;margin:0 0 14px}
html[data-fx-editorial="midday"] .fxt-row:last-child{margin-bottom:0}
html[data-fx-editorial="midday"] .fxt-field{display:grid;gap:7px;min-width:0;font-size:13px;line-height:1.4;color:var(--p-fg-2)}
html[data-fx-editorial="midday"] .fxt-lab{display:block}
html[data-fx-editorial="midday"] .fxt-field small{font-size:12px;color:var(--p-muted);margin-left:4px}
html[data-fx-editorial="midday"] .fxt input,html[data-fx-editorial="midday"] .fxt select,html[data-fx-editorial="midday"] .fxt textarea{width:100%;min-width:0;min-height:48px;padding:0 14px;font:400 16px/1.3 var(--p-font);color:var(--p-fg);background:var(--p-surface);border:1px solid var(--p-border);border-radius:0;box-shadow:none;-webkit-appearance:none;appearance:none;font-variant-numeric:tabular-nums}
html[data-fx-editorial="midday"] .fxt select{padding-right:38px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23b3b3b3' stroke-width='1.4'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 14px center;cursor:pointer}
html[data-fx-editorial="midday"] .fxt select option,html[data-fx-editorial="midday"] .fxt select optgroup{background:#121212;color:#f5f5f5}
html[data-fx-editorial="midday"] .fxt textarea{min-height:184px;padding:14px;line-height:1.55;resize:vertical;font-size:15px}
html[data-fx-editorial="midday"] .fxt textarea::placeholder{color:#6f6f6f}
html[data-fx-editorial="midday"] .fxt input:hover,html[data-fx-editorial="midday"] .fxt select:hover,html[data-fx-editorial="midday"] .fxt textarea:hover{border-color:#3a3a3a}
html[data-fx-editorial="midday"] .fxt input:focus,html[data-fx-editorial="midday"] .fxt select:focus,html[data-fx-editorial="midday"] .fxt textarea:focus{border-color:var(--p-fg);outline:0}
html[data-fx-editorial="midday"] .fxt input::-webkit-outer-spin-button,html[data-fx-editorial="midday"] .fxt input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
html[data-fx-editorial="midday"] .fxt input[type=number]{-moz-appearance:textfield}
html[data-fx-editorial="midday"] .fxt-affix{position:relative;display:block}
html[data-fx-editorial="midday"] .fxt-affix input{padding-right:58px}
html[data-fx-editorial="midday"] .fxt-affix>span{position:absolute;right:14px;top:50%;transform:translateY(-50%);font-size:14px;color:var(--p-muted);pointer-events:none}
html[data-fx-editorial="midday"] .fxt-seg{display:flex;min-width:0}
html[data-fx-editorial="midday"] .fxt-seg button{flex:1 1 0;min-width:0;min-height:48px;padding:0 12px;font:400 15px/1.2 var(--p-font);color:var(--p-fg-2);background:var(--p-surface);border:1px solid var(--p-border);border-radius:0;cursor:pointer}
html[data-fx-editorial="midday"] .fxt-seg button+button{border-left:0}
html[data-fx-editorial="midday"] .fxt-seg button:hover{color:var(--p-fg)}
html[data-fx-editorial="midday"] .fxt-seg button[aria-pressed="true"]{background:var(--p-fg);color:var(--p-bg);border-color:var(--p-fg)}
html[data-fx-editorial="midday"] .fxt-seglabel{display:grid;gap:7px;font-size:13px;color:var(--p-fg-2);min-width:0}
html[data-fx-editorial="midday"] .fxt-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px}
html[data-fx-editorial="midday"] .fxt-btn{display:inline-flex;align-items:center;justify-content:center;min-height:46px;padding:0 18px;font:400 14px/1.2 var(--p-font);color:var(--p-primary-fg);background:var(--p-primary);border:1px solid var(--p-primary);border-radius:0;cursor:pointer;text-decoration:none}
html[data-fx-editorial="midday"] .fxt-btn:hover{background:#dedede}
html[data-fx-editorial="midday"] .fxt-btn-ghost{color:var(--p-fg);background:transparent;border-color:var(--p-border)}
html[data-fx-editorial="midday"] .fxt-btn-ghost:hover{background:var(--p-surface);border-color:var(--p-muted)}
html[data-fx-editorial="midday"] .fxt-msg{margin:14px 0 0;padding:14px 16px;border:1px solid var(--p-border);background:var(--p-surface-2);font-size:14px;line-height:1.6;color:var(--p-fg-2)}
html[data-fx-editorial="midday"] .fxt-msg b{color:var(--p-fg);font-weight:400}
html[data-fx-editorial="midday"] .fxt-msg ul{margin:8px 0 0;padding-left:18px}
html[data-fx-editorial="midday"] .fxt-msg li{margin:0 0 4px}
html[data-fx-editorial="midday"] .fxt-msg-foot{display:block;margin-top:8px;font-size:13px;color:var(--p-muted)}
html[data-fx-editorial="midday"] .fxt-rate{margin:14px 0 0;font-size:13px;line-height:1.55;color:var(--p-muted)}
html[data-fx-editorial="midday"] .fxt-rate button{padding:0;margin:0 0 0 4px;font:inherit;color:var(--p-fg-2);background:none;border:0;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
html[data-fx-editorial="midday"] .fxt-ratebox{margin-top:12px;max-width:280px}
html[data-fx-editorial="midday"] .fxt-out{position:sticky;top:84px}
html[data-fx-editorial="midday"] .fxt-k{font-size:13px;color:var(--p-muted);margin:0 0 10px;line-height:1.5}
html[data-fx-editorial="midday"] .fxt-big{display:flex;align-items:baseline;gap:12px;margin:0;font-size:clamp(52px,6vw,76px);line-height:1;letter-spacing:-.035em;color:var(--p-fg);font-variant-numeric:tabular-nums}
html[data-fx-editorial="midday"] .fxt-big small{font-size:20px;letter-spacing:0;color:var(--p-fg-2)}
html[data-fx-editorial="midday"] .fxt-empty .fxt-big{color:#5c5c5c}
html[data-fx-editorial="midday"] .fxt-note{margin:12px 0 22px;font-size:14px;line-height:1.55;color:var(--p-fg-2)}
html[data-fx-editorial="midday"] .fxt-dl{margin:0;border-top:1px solid var(--p-border)}
html[data-fx-editorial="midday"] .fxt-dl div{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 16px;padding:13px 0;border-bottom:1px solid var(--p-border);font-size:15px;line-height:1.45}
html[data-fx-editorial="midday"] .fxt-dl dt{color:var(--p-fg-2)}
html[data-fx-editorial="midday"] .fxt-dl dd{margin:0;color:var(--p-fg);text-align:right;font-variant-numeric:tabular-nums}
html[data-fx-editorial="midday"] .fxt-dl dd small{display:block;font-size:12px;color:var(--p-muted)}
html[data-fx-editorial="midday"] .fxt-tbl{width:100%;margin:18px 0 0;border-collapse:collapse;font-size:14px;line-height:1.5;font-variant-numeric:tabular-nums}
html[data-fx-editorial="midday"] .fxt-tbl caption{caption-side:top;text-align:left;font-size:13px;color:var(--p-muted);padding:0 0 8px}
html[data-fx-editorial="midday"] .fxt-tbl :is(th,td){padding:10px 8px;border-bottom:1px solid var(--p-border);text-align:right;font:400 14px/1.5 var(--p-font);letter-spacing:0;text-transform:none;background:none;white-space:nowrap}
html[data-fx-editorial="midday"] .fxt-tbl :is(th,td):first-child{text-align:left;padding-left:0}
html[data-fx-editorial="midday"] .fxt-tbl :is(th,td):last-child{padding-right:0}
html[data-fx-editorial="midday"] .fxt-tbl thead th{color:var(--p-muted);font-size:12px}
html[data-fx-editorial="midday"] .fxt-tbl caption{font-family:var(--p-font)}
html[data-fx-editorial="midday"] .fxt-tbl tbody th{color:var(--p-fg-2)}
html[data-fx-editorial="midday"] .fxt-tbl td{color:var(--p-fg)}
html[data-fx-editorial="midday"] .fxt-tbl tr.is-current :is(th,td){background:var(--p-surface-2);color:var(--p-fg)}
html[data-fx-editorial="midday"] .fxt-scroll{overflow-x:auto;overscroll-behavior-x:contain}
html[data-fx-editorial="midday"] .fxt-warn{margin:18px 0 0;display:grid;gap:10px}
html[data-fx-editorial="midday"] .fxt-warn p{margin:0;padding:12px 14px;border-left:2px solid var(--p-fg-2);background:var(--p-surface);font-size:14px;line-height:1.55;color:var(--p-fg)}
html[data-fx-editorial="midday"] .fxt-fine{margin:18px 0 0;font-size:12.5px;line-height:1.55;color:var(--p-muted)}
html[data-fx-editorial="midday"] .fxt-copy{margin-top:18px;width:100%}
html[data-fx-editorial="midday"] .fxt-bar{display:none}
html[data-fx-editorial="midday"] .fxt-pvtable{margin-top:24px}
html[data-fx-editorial="midday"] [hidden]{display:none!important}

/* Tools hub */
html[data-fx-editorial="midday"] .fxt-hub{padding:48px 0 88px}
html[data-fx-editorial="midday"] .fxt-hub .post h3{max-width:24ch}

@media(max-width:960px){
  html[data-fx-editorial="midday"] .fxt-grid{grid-template-columns:minmax(0,1fr)}
  html[data-fx-editorial="midday"] .fxt-out{position:static}
}
@media(max-width:700px){
  html[data-fx-editorial="midday"] .page-hero.fxt-hero{padding:96px 0 26px}
  html[data-fx-editorial="midday"] .fxt-hero .lead{font-size:16px}
  html[data-fx-editorial="midday"] .fxt{padding:24px 0 48px}
  html[data-fx-editorial="midday"] .fxt-card{padding:20px 18px}
  html[data-fx-editorial="midday"] .fxt-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}
  html[data-fx-editorial="midday"] .fxt-row.fxt-row-1{grid-template-columns:minmax(0,1fr)}
  html[data-fx-editorial="midday"] .fxt-tbl :is(th,td){padding:9px 5px;font-size:13px}
  html[data-fx-editorial="midday"] .fxt textarea{min-height:168px}
  /* A slim result bar while the form is on screen, clear of the Telegram button. */
  html[data-fx-editorial="midday"] .fxt-bar{position:fixed;left:0;right:0;bottom:0;z-index:1400;display:flex;align-items:center;gap:16px;padding:12px 84px calc(12px + env(safe-area-inset-bottom)) 18px;background:#161616;border-top:1px solid var(--p-border);font-size:14px;color:var(--p-fg-2);transform:translateY(110%);transition:transform .18s ease}
  html[data-fx-editorial="midday"] .fxt-bar.is-on{transform:none}
  html[data-fx-editorial="midday"] .fxt-bar b{font-weight:400;font-size:20px;color:var(--p-fg);font-variant-numeric:tabular-nums}
  html[data-fx-editorial="midday"] .fxt-bar a{margin-left:auto;color:var(--p-fg);text-decoration:underline;text-underline-offset:3px;white-space:nowrap}
}
@media(prefers-reduced-motion:reduce){html[data-fx-editorial="midday"] .fxt-bar{transition:none}}
