/* =========================================================
   STYLE: colours, fonts and the square look for the whole site
   ========================================================= */

/* ---------- Fonts (saved inside the site, no Google connection) ---------- */
@font-face {
  font-family: "Aref Ruqaa"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("../fonts/aref-ruqaa-arabic-700-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Aref Ruqaa"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("../fonts/aref-ruqaa-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Oranienbaum"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../fonts/oranienbaum-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans Arabic"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "IBM Plex Sans Arabic"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../fonts/ibm-plex-sans-arabic-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans Arabic"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("../fonts/ibm-plex-sans-arabic-arabic-500-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "IBM Plex Sans Arabic"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("../fonts/ibm-plex-sans-arabic-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans Arabic"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("../fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "IBM Plex Sans Arabic"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("../fonts/ibm-plex-sans-arabic-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Design tokens ---------- */
:root {
  --blue: #1A0089;    /* Dark Blue: text, primary buttons, borders */
  --cream: #EFE7DB;   /* White Chocolate: page background, tool cards */
  --orange: #FF5E33;  /* Portland Orange: accent, Business */
  --lime: #B7CF4F;    /* June Bud: secondary buttons, Students */
  --white: #FFFFFF;   /* Everyday icon boxes, cards */

  --line: 2px solid var(--blue);
  --thin: 1px solid var(--blue);
  --shadow: 10px 10px 0 var(--blue);

  --f-ar-display: "Aref Ruqaa", "IBM Plex Sans Arabic", serif;
  --f-en-display: "Oranienbaum", Georgia, "Times New Roman", serif;
  --f-body: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;

  --wrap: 1200px;
  --gutter: 20px;
}
@media (min-width: 720px) { :root { --gutter: 32px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; border-radius: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--blue);
  font-family: var(--f-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.25em; text-decoration-thickness: 2px; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--f-ar-display);
  font-weight: 700;
  line-height: 1.35;
}
html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] h3, html[lang="en"] h4 {
  font-family: var(--f-en-display);
  font-weight: 400;
  line-height: 1.15;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
[hidden] { display: none !important; }

/* Line icons */
.icon {
  width: 24px; height: 24px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: square; stroke-linejoin: miter;
}

/* "Other language" labels: English under Arabic, or Arabic under English */
.alt { font-family: var(--f-en-display); font-weight: 400; }
html[lang="en"] .alt { font-family: var(--f-body); }
html[dir="rtl"] .alt { text-align: right; }
html[dir="ltr"] .alt { text-align: left; }
.en-label { font-family: var(--f-en-display); font-weight: 400; unicode-bidi: isolate; }
[tabindex="-1"]:focus { outline: none; }

/* Keyboard focus: always visible */
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.on-dark :focus-visible, .site-footer :focus-visible { outline-color: var(--lime); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 26px;
  border: var(--line);
  font-family: var(--f-body); font-weight: 600; font-size: 1.0625rem; line-height: 1.3;
  text-decoration: none; text-align: center;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translate(-3px, -3px); box-shadow: 3px 3px 0 var(--blue); }
.btn:active { transform: none; box-shadow: none; }
.btn-primary { background: var(--blue); color: var(--cream); }
.btn-lime { background: var(--lime); color: var(--blue); }
.btn-outline { background: transparent; color: var(--blue); }
.btn-orange { background: var(--orange); color: var(--blue); }
.btn .icon { width: 20px; height: 20px; }

/* ---------- Header ---------- */
.skip-link {
  position: absolute; inset-inline-start: 12px; top: -100px; z-index: 50;
  background: var(--blue); color: var(--cream); padding: 10px 16px; font-weight: 600;
}
.skip-link:focus { top: 12px; }

.site-header { background: var(--cream); border-bottom: var(--line); position: relative; z-index: 20; }
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.logo {
  font-family: var(--f-ar-display); font-weight: 700; font-size: 2.1rem; line-height: 1;
  text-decoration: none; padding-block: 8px 12px; margin-inline-end: auto;
}
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-switch {
  min-height: 44px; padding: 6px 14px;
  background: transparent; border: var(--line);
  font-weight: 600; font-size: .9375rem;
}
.lang-switch:hover { background: var(--blue); color: var(--cream); }
.menu-toggle {
  width: 48px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--blue); color: var(--cream); border: var(--line);
}
.menu-toggle .icon-close { display: none; }
.nav-open .menu-toggle .icon-open { display: none; }
.nav-open .menu-toggle .icon-close { display: block; }

/* Phone menu: drops down under the header */
.main-nav { display: none; }
.nav-open .main-nav {
  display: block; position: absolute; top: 100%; inset-inline: 0;
  background: var(--cream); border-bottom: var(--line);
}
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.nav-open .main-nav ul { padding-inline: var(--gutter); }
.nav-open .main-nav li + li { border-top: var(--thin); }
.main-nav a {
  display: block; padding: 14px 0; text-decoration: none; font-weight: 500; font-size: 1.0625rem;
}
.main-nav a:hover { text-decoration: underline; }

/* Desktop menu: one row, thin vertical lines between links */
@media (min-width: 1000px) {
  .menu-toggle { display: none; }
  .main-nav, .nav-open .main-nav { display: block; position: static; border: 0; background: none; }
  .main-nav ul, .nav-open .main-nav ul { display: flex; align-items: center; padding: 0; }
  .main-nav li + li, .nav-open .main-nav li + li { border-top: 0; border-inline-start: var(--thin); }
  .main-nav a { padding: 4px 18px; font-size: 1rem; line-height: 1.4; }
  .header-actions { margin-inline-start: 8px; }
}

/* ---------- Hero ---------- */
.hero { padding-block: 44px 64px; }
.hero-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 920px) {
  .hero { padding-block: 80px 96px; }
  .hero-grid { grid-template-columns: 1.15fr .85fr; gap: 64px; }
}
.eyebrow {
  display: inline-block; margin: 0 0 18px;
  font-size: 1.1875rem; line-height: 1.4;
  border-bottom: var(--line); padding-bottom: 4px;
}
.hero-title { font-size: clamp(2.6rem, 10vw, 4.9rem); line-height: 1.4; margin-bottom: 20px; }
html[lang="en"] .hero-title { font-size: clamp(2.6rem, 9vw, 4.6rem); line-height: 1.1; }
.hero-title .line { display: block; }
/* Orange words sit on a dark blue strip so they stay easy to read */
.hero-title .hl {
  display: inline-block; margin-top: .12em;
  background: var(--blue); color: var(--orange);
  padding: 0 .28em .08em;
}
html[lang="en"] .hero-title .hl { padding: .08em .28em .12em; }
.hero-text { font-size: 1.125rem; max-width: 34em; margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
@media (max-width: 479px) { .hero-actions .btn { flex: 1 1 100%; } }

/* Invoice preview card */
.invoice-figure { margin: 0; padding: 0 10px 10px 0; justify-self: center; width: 100%; max-width: 460px; }
.invoice {
  background: var(--white); border: var(--line); box-shadow: var(--shadow);
  font-size: .9375rem; line-height: 1.5;
}
.invoice-head {
  background: var(--lime); border-bottom: var(--line);
  padding: 16px 20px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
}
.invoice-title { font-family: var(--f-ar-display); font-weight: 700; font-size: 1.6rem; line-height: 1.2; margin: 0; }
html[lang="en"] .invoice-title { font-family: var(--f-en-display); font-weight: 400; }
.invoice-title .alt { display: block; font-size: 1rem; margin-top: 4px; }
.invoice-meta { text-align: end; font-size: .875rem; font-weight: 500; }
.invoice-meta span { display: block; }
.invoice-parties { display: grid; grid-template-columns: 1fr 1fr; border-bottom: var(--thin); }
.invoice-parties > div { padding: 12px 20px; }
.invoice-parties > div + div { border-inline-start: var(--thin); }
.party-label { display: block; font-size: .8125rem; font-weight: 600; }
.invoice-table { width: 100%; border-collapse: collapse; }
.invoice-table th, .invoice-table td { padding: 9px 20px; text-align: start; }
.invoice-table th { font-size: .8125rem; font-weight: 600; border-bottom: var(--thin); }
.invoice-table td { border-bottom: var(--thin); }
.invoice-table .num { text-align: end; white-space: nowrap; }
.invoice-table .sum td { border-bottom: 0; padding-block: 6px; }
.invoice-table .sum-first td { padding-top: 12px; }
.invoice-table .total td {
  background: var(--orange); border-top: var(--line); border-bottom: var(--line);
  font-weight: 600; font-size: 1.125rem; padding-block: 12px;
}
.invoice-actions { display: flex; gap: 10px; padding: 16px 20px; }
.btn-sm {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 6px 18px; border: var(--line); font-weight: 600; font-size: .9375rem;
}
.btn-sm.dark { background: var(--blue); color: var(--cream); }
.invoice-caption { margin-top: 18px; font-size: .875rem; font-weight: 500; text-align: center; }

/* ---------- Tools section (dark blue) ---------- */
.tools { background: var(--blue); color: var(--cream); padding-block: 64px 80px; border-block: var(--line); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 20px; margin-bottom: 28px; }
.section-title { font-size: clamp(2.4rem, 8vw, 3.6rem); }
.section-head .alt { font-size: clamp(1.4rem, 4.5vw, 1.9rem); color: var(--lime); }

.tabs { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 8px; padding: 0; list-style: none; }
.tab {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 8px 18px; border: 2px solid var(--blue);
  color: var(--blue); font-weight: 600; text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease;
}
.tab:hover { transform: translate(-3px, -3px); box-shadow: 3px 3px 0 var(--cream); }
.tab-count { font-size: .8125rem; font-weight: 600; border: var(--line); padding: 0 7px; line-height: 1.6; }
.cat-business { --cat: var(--orange); }
.cat-students { --cat: var(--lime); }
.cat-everyday { --cat: var(--cream); --cat-icon: var(--white); }
.tab.cat-business { background: var(--orange); }
.tab.cat-students { background: var(--lime); }
.tab.cat-everyday { background: var(--cream); }

.tool-group { margin-top: 56px; scroll-margin-top: 24px; }
.group-title {
  display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px;
  font-size: clamp(1.9rem, 6vw, 2.5rem);
  border-bottom: 5px solid var(--cat); padding-bottom: 6px; margin-bottom: 24px;
}
.group-title .alt { font-size: 1.25rem; }

.tool-grid { display: grid; gap: 18px; grid-template-columns: 1fr; list-style: none; margin: 0; padding: 0; }
@media (min-width: 640px) { .tool-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .tool-grid { grid-template-columns: repeat(3, 1fr); gap: 22px; } }
.tool-grid > li { display: flex; }

.tool-card {
  flex: 1; display: grid; grid-template-columns: 56px 1fr; gap: 4px 16px; align-content: start;
  background: var(--cream); color: var(--blue); border: 2px solid var(--blue);
  padding: 20px; text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease;
}
a.tool-card:hover { transform: translate(-4px, -4px); box-shadow: 8px 8px 0 var(--cat); }
a.tool-card:hover .tool-name { text-decoration: underline; text-decoration-thickness: 2px; }
.icon-box {
  grid-row: span 3;
  width: 56px; height: 56px; display: flex; align-items: center; justify-content: center;
  background: var(--cat-icon, var(--cat)); border: var(--line); color: var(--blue);
}
.icon-box .icon { width: 30px; height: 30px; }
.tool-name { font-family: var(--f-ar-display); font-weight: 700; font-size: 1.55rem; line-height: 1.3; margin: 0; }
html[lang="en"] .tool-name { font-family: var(--f-en-display); font-weight: 400; font-size: 1.6rem; line-height: 1.15; }
.tool-name-alt { font-size: 1.0625rem; line-height: 1.3; margin: 2px 0 6px; }
html[lang="en"] .tool-name-alt { font-size: .9375rem; }
.tool-desc { font-size: .9375rem; line-height: 1.6; margin: 0; }
.tool-tag {
  grid-column: 2; justify-self: start; margin-top: 12px;
  font-size: .8125rem; font-weight: 600; line-height: 1.5;
  border: var(--line); padding: 1px 9px;
}
.tool-tag .alt { font-size: .875rem; }
.tool-tag.ready { background: var(--lime); }

/* ---------- Promise strip ---------- */
.promise { padding-block: 0; border-bottom: var(--line); }
.promise-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; }
.promise-item { padding: 28px 0; }
.promise-item + .promise-item { border-top: var(--thin); }
@media (min-width: 760px) {
  .promise-list { grid-template-columns: repeat(3, 1fr); }
  .promise-item { padding: 40px 28px; }
  .promise-item:first-child { padding-inline-start: 0; }
  .promise-item + .promise-item { border-top: 0; border-inline-start: var(--thin); }
}
.promise-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 12px; margin-bottom: 6px; }
.promise-title { font-size: 2rem; }
.promise-head .alt { font-size: 1.125rem; }
.promise-item p { margin: 0; }

/* ---------- Orange box ---------- */
.ask { padding-block: 64px 80px; }
.ask-box {
  background: var(--orange); border: var(--line); box-shadow: var(--shadow);
  padding: 32px 24px; margin-right: 10px;
  display: grid; gap: 24px; align-items: center;
}
@media (min-width: 820px) {
  .ask-box { grid-template-columns: 1fr auto; padding: 48px; gap: 40px; }
}
.ask-title { font-size: clamp(1.9rem, 6.5vw, 3rem); margin-bottom: 8px; }
.ask-box p { margin: 0; font-size: 1.0625rem; }

/* ---------- Footer (dark blue) ---------- */
.site-footer { background: var(--blue); color: var(--cream); padding-block: 48px 28px; border-top: var(--line); }
.footer-main { display: grid; gap: 28px; padding-bottom: 32px; border-bottom: 1px solid var(--cream); scroll-margin-top: 24px; }
.footer-main:focus { outline: none; }
@media (min-width: 820px) { .footer-main { grid-template-columns: 1.4fr 1fr; align-items: end; } }
.footer-title { font-size: clamp(1.8rem, 6vw, 2.6rem); margin-bottom: 6px; }
.footer-lead { font-size: 1.125rem; color: var(--lime); font-weight: 500; margin: 0; }
.footer-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-contact li { display: flex; gap: 14px; align-items: baseline; }
.contact-label { min-width: 86px; font-weight: 600; }
.footer-contact a { color: var(--lime); }
.footer-bottom { padding-top: 20px; font-size: .875rem; display: grid; gap: 6px; }
.footer-bottom p { margin: 0; }
@media (min-width: 820px) { .footer-bottom { grid-template-columns: 1fr auto; } }

/* ---------- Tool pages ---------- */
.tool-page { padding-block: 28px 72px; }
.back-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-weight: 600; text-decoration: none; border-bottom: var(--line);
}
.back-link:hover { background: var(--blue); color: var(--cream); padding-inline: 8px; }
.tool-intro { display: grid; grid-template-columns: 64px 1fr; gap: 4px 18px; align-items: center; margin: 28px 0 32px; }
.tool-intro .icon-box { width: 64px; height: 64px; grid-row: span 2; }
.tool-intro .icon-box .icon { width: 34px; height: 34px; }
.tool-title { font-size: clamp(2.1rem, 8vw, 3.4rem); }
.tool-intro .alt { font-size: 1.3rem; line-height: 1.3; }
.tool-lead { grid-column: 1 / -1; font-size: 1.125rem; max-width: 40em; margin: 14px 0 0; }

.tool-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: start; }
@media (min-width: 980px) { .tool-layout { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 56px; } }

.tool-area {
  background: var(--white); border: var(--line); box-shadow: var(--shadow);
  padding: 22px 18px 24px; margin-right: 10px;
}
@media (min-width: 560px) { .tool-area { padding: 30px; } }

.privacy-note {
  display: flex; gap: 10px; align-items: flex-start; margin: 20px 0 0;
  font-size: .9375rem; font-weight: 500;
}
.privacy-note .icon { margin-top: 2px; }

/* Shared form parts */
fieldset { border: 0; margin: 0 0 24px; padding: 0; min-width: 0; }
legend, .field-label { display: block; font-weight: 600; font-size: 1.0625rem; margin-bottom: 10px; padding: 0; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; border: var(--line); }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label {
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
  min-height: 64px; padding: 10px 14px; cursor: pointer; background: var(--cream);
}
.segmented label + input + label { border-inline-start: var(--line); }
.seg-title { font-weight: 600; font-size: 1.0625rem; line-height: 1.35; }
.seg-hint { font-size: .8125rem; line-height: 1.4; }
.segmented input:checked + label { background: var(--blue); color: var(--cream); }
.segmented input:focus-visible + label { outline: 3px solid var(--orange); outline-offset: -7px; }
.segmented label:hover { text-decoration: underline; }

.field { margin-bottom: 24px; }
.tool-area[data-mode="add"] .when-remove,
.tool-area[data-mode="remove"] .when-add { display: none; }
.input-row { display: flex; border: var(--line); background: var(--white); }
.input-row:focus-within { outline: 3px solid var(--blue); outline-offset: 3px; }
.input-row input {
  flex: 1; min-width: 0; width: 100%; border: 0; background: transparent; outline: none;
  -webkit-appearance: none; appearance: none;
  font-size: 1.75rem; font-weight: 600; padding: 10px 16px; min-height: 64px;
}
html[dir="rtl"] .input-row input { text-align: right; }
.input-suffix {
  display: flex; align-items: center; padding-inline: 18px;
  border-inline-start: var(--line); background: var(--cream); font-weight: 600;
}
.field-hint { font-size: .875rem; margin: 8px 0 0; }
.field-error {
  margin: 10px 0 0; padding: 8px 12px; border: var(--line); background: var(--cream);
  font-weight: 600; font-size: .9375rem;
}
.field-error::before { content: "!"; display: inline-block; width: 1.5em; font-weight: 600; }

/* Results */
.results { border: var(--line); }
.result-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 16px; }
.result-row + .result-row { border-top: var(--thin); }
.result-label { font-weight: 500; }
.result-value { font-weight: 600; font-size: 1.25rem; white-space: nowrap; }
.result-value .cur { font-size: .875rem; font-weight: 500; margin-inline-start: 4px; }
.result-row.is-total { background: var(--orange); border-top: var(--line); padding-block: 16px; }
.result-row.is-total .result-label { font-weight: 600; }
.result-row.is-total .result-value { font-size: 1.6rem; }
.formula { margin: 14px 0 0; font-size: .9375rem; }
.formula-math { display: block; font-weight: 600; font-variant-numeric: tabular-nums; }
html[dir="rtl"] .formula-math { text-align: right; }
.tool-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.tool-actions .btn { flex: 1 1 160px; }
.copy-status { min-height: 1.7em; margin: 10px 0 0; font-weight: 600; font-size: .9375rem; }

/* How to use */
.how-to { border-top: var(--line); padding-top: 26px; }
.how-title { font-size: clamp(1.8rem, 6vw, 2.3rem); margin-bottom: 18px; }
.steps { list-style: none; margin: 0 0 24px; padding: 0; counter-reset: step; display: grid; gap: 16px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; }
.steps li::before {
  content: counter(step);
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  background: var(--lime); border: var(--line); font-weight: 600; font-size: 1.125rem;
}
.steps p { margin: 8px 0 0; }
.note-box { border: var(--line); background: var(--cream); padding: 14px 16px; font-size: .9375rem; }
.note-box p { margin: 0; }
.note-box p + p { margin-top: 8px; }
.tool-bottom { margin-top: 56px; }

/* 404 */
.not-found { padding-block: 80px; text-align: center; }
.not-found h1 { font-size: clamp(2.4rem, 9vw, 4rem); margin-bottom: 16px; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .btn:hover, .tab:hover, a.tool-card:hover { transform: none; }
}

/* ---------- Print: only the tool area ---------- */
@media print {
  .site-header, .site-footer, .back-link, .tool-actions, .how-to, .privacy-note { display: none !important; }
  body { background: #fff; }
  .tool-area { box-shadow: none; }
}
