
/* ---------- Tokens ---------- */
:root {
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --sunken: #F3F5F7;
  --hero: #EFF3F5;
  --border: #DDE3E8;
  --border-strong: #A9B6C0;
  --text: #1A2B35;
  --muted: #52626D;
  --heading: #102C3A;
  --primary: #102C3A;
  --primary-hover: #1A4256;
  --on-primary: #FFFFFF;
  --accent: #0F766E;          /* teal, text-safe on white (5.5:1) */
  --accent-bright: #0D9488;   /* brand teal: icons, borders, large elements */
  --accent-soft: #E3F4F2;
  --gold: #F4B942;            /* decorative accent only */
  --gold-soft: #FDF4DE;
  --gold-text: #7A5200;
  --danger: #B42318;
  --danger-soft: #FDECEA;
  --success: #17703F;
  --success-soft: #E5F3EA;
  --toast-bg: #102C3A;
  --toast-text: #FFFFFF;
  --footer-bg: #102C3A;
  --footer-text: #C6D5DC;
  --shadow: 0 1px 2px rgba(16, 44, 58, .06), 0 6px 18px rgba(16, 44, 58, .07);
  --shadow-lg: 0 2px 6px rgba(16, 44, 58, .08), 0 16px 40px rgba(16, 44, 58, .10);

  --font: "IBM Plex Sans", "Noto Sans Ethiopic", "Nyala", "Abyssinica SIL", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --wrap: 1280px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 68px;

  color-scheme: light;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1A22; --surface: #10242F; --sunken: #0D1E27; --hero: #0E212B; --border: #213B48; --border-strong: #3A5664;
    --text: #E2EBF0; --muted: #9DB1BC; --heading: #F1F6F9;
    --primary: #14B8A6; --primary-hover: #2DD4BF; --on-primary: #062421;
    --accent: #5EEAD4; --accent-bright: #2DD4BF; --accent-soft: #12343A;
    --gold-soft: #3A2F12; --gold-text: #F4CB6B;
    --danger: #F28A82; --danger-soft: #3A1B1C; --success: #63CC93; --success-soft: #133023;
    --toast-bg: #E2EBF0; --toast-text: #0B1A22; --footer-bg: #07131A; --footer-text: #A9BCC6;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 18px rgba(0,0,0,.28); --shadow-lg: 0 2px 6px rgba(0,0,0,.3), 0 16px 40px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B1A22; --surface: #10242F; --sunken: #0D1E27; --hero: #0E212B; --border: #213B48; --border-strong: #3A5664;
  --text: #E2EBF0; --muted: #9DB1BC; --heading: #F1F6F9;
  --primary: #14B8A6; --primary-hover: #2DD4BF; --on-primary: #062421;
  --accent: #5EEAD4; --accent-bright: #2DD4BF; --accent-soft: #12343A;
  --gold-soft: #3A2F12; --gold-text: #F4CB6B;
  --danger: #F28A82; --danger-soft: #3A1B1C; --success: #63CC93; --success-soft: #133023;
  --toast-bg: #E2EBF0; --toast-text: #0B1A22; --footer-bg: #07131A; --footer-text: #A9BCC6;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 18px rgba(0,0,0,.28); --shadow-lg: 0 2px 6px rgba(0,0,0,.3), 0 16px 40px rgba(0,0,0,.35);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: inherit; }
html { scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 80px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
:lang(am) body, body:lang(am) { font-size: 1.09rem; }
h1, h2, h3 { color: var(--heading); line-height: 1.3; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.4rem); }
h2 { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.6rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-underline-offset: 3px; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.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; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--primary); color: var(--on-primary); padding: 10px 16px; border-radius: var(--r-sm); text-decoration: none; }
.skip:focus { top: calc(env(safe-area-inset-top, 0px) + 12px); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

/* ---------- Icons ---------- */
.ic { display: inline-flex; width: 1.25em; height: 1.25em; flex: none; }
.ic svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px; padding: 0 20px; border-radius: 10px; border: 1.5px solid transparent;
  font-weight: 600; text-decoration: none; cursor: pointer; line-height: 1.2; text-align: center;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn-lg { min-height: 54px; padding: 0 24px; font-size: 1.05rem; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--surface); color: var(--heading); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 10px; border: 1px solid transparent;
  background: transparent; color: var(--muted); cursor: pointer; padding: 0;
}
.btn-icon:hover:not(:disabled) { background: var(--sunken); color: var(--heading); }
.btn-icon:disabled { opacity: .35; cursor: not-allowed; }
.btn-icon .ic { width: 22px; height: 22px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30;
  background: var(--bg); border-bottom: 1px solid var(--border);
}
.header-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 20px; min-height: var(--header-h); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
/* Lockup proportions from the brand file (icon 532 x 672). Wordmark width = height x ADH.BRAND.wordmark.ratio (8.792). */
.brand { --logo-h: 38px; display: inline-flex; align-items: flex-start; text-decoration: none; color: var(--heading); border-radius: var(--r-sm); flex: none; }
.logo-icon { width: calc(var(--logo-h) * 0.7917); height: var(--logo-h); flex: none; }
.logo-word { height: calc(var(--logo-h) * 0.446); width: calc(var(--logo-h) * 0.446 * 8.792); margin-left: calc(var(--logo-h) * 0.514); margin-top: calc(var(--logo-h) * 0.295); flex: none; }
.header-search { justify-self: center; width: 100%; max-width: 620px; }
.header-search .search-input { min-height: 46px; border-radius: 999px; background: var(--sunken); border-color: transparent; font-size: 1rem; }
.header-search .search-input:focus { background: var(--surface); }
.header-actions { display: flex; align-items: center; gap: 6px; }
.header-link { padding: 8px 12px; border-radius: var(--r-sm); color: var(--heading); text-decoration: none; font-weight: 600; white-space: nowrap; }
.header-link:hover { background: var(--sunken); }
.header-link[aria-current="page"] { color: var(--accent); }
.lang-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
.lang-switch a { padding: 5px 12px; border-radius: 999px; text-decoration: none; color: var(--muted); font-size: .92rem; font-weight: 600; white-space: nowrap; }
.lang-switch a[aria-current="true"] { background: var(--primary); color: var(--on-primary); }
.menu-btn { display: none; }
.drawer { display: none; }

/* Woven band: gold tibeb diamonds on a thin navy strip */
.tibeb { height: 8px; position: relative; background: #102C3A; }
.tibeb::before, .tibeb::after { content: ""; position: absolute; inset: 0; -webkit-mask-repeat: repeat-x; mask-repeat: repeat-x; -webkit-mask-position: center; mask-position: center; }
.tibeb::before {
  background: #F4B942;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='8'%3E%3Cpath d='M7 .5l3.5 3.5L7 7.5 3.5 4z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='8'%3E%3Cpath d='M7 .5l3.5 3.5L7 7.5 3.5 4z'/%3E%3C/svg%3E");
}
.tibeb::after {
  background: #2DD4BF;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='8'%3E%3Cpath d='M21 2.5l1.5 1.5L21 5.5 19.5 4z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='8'%3E%3Cpath d='M21 2.5l1.5 1.5L21 5.5 19.5 4z'/%3E%3C/svg%3E");
}

@media (max-width: 1023px) {
  .header-row { grid-template-columns: auto 1fr auto; row-gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .header-search { grid-column: 1 / -1; grid-row: 2; max-width: none; }
  .header-actions { grid-column: 3; grid-row: 1; }
  .header-link { display: none; }
  .menu-btn { display: inline-flex; }
  .nav-open .drawer { display: block; border-top: 1px solid var(--border); background: var(--bg); padding: 8px var(--gutter) 18px; max-height: calc(100vh - 140px); overflow-y: auto; }
  .drawer ul { list-style: none; margin: 0; padding: 0; }
  .drawer a { display: flex; align-items: center; gap: 12px; padding: 12px 8px; color: var(--heading); text-decoration: none; font-weight: 600; border-radius: var(--r-sm); min-height: 48px; }
  .drawer a .ic { color: var(--accent-bright); }
  .drawer a[aria-current="page"] { background: var(--accent-soft); }
  .drawer-pages { border-top: 1px solid var(--border); margin-top: 8px !important; padding-top: 8px !important; }
  .drawer-pages a { font-weight: 500; color: var(--text); }
}
@media (max-width: 1180px) and (min-width: 1024px) { .site-header .brand { --logo-h: 32px; } }
@media (max-width: 559px) { .site-header .logo-word { display: none; } }
@media (max-width: 420px) { .lang-switch a { padding: 5px 9px; } }

/* ---------- Search ---------- */
.search { position: relative; }
.search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-input {
  width: 100%; min-height: 52px; padding: 0 16px 0 48px;
  border: 1.5px solid var(--border-strong); border-radius: var(--r-md); background: var(--surface);
  font-size: 1.02rem;
}
.search-input:focus { outline: none; border-color: var(--accent-bright); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-input::-webkit-search-cancel-button { cursor: pointer; }
.search-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40;
  list-style: none; margin: 0; padding: 6px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-lg);
  max-height: 60vh; overflow-y: auto;
}
.search-option { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-sm); cursor: pointer; }
.search-option .ic { color: var(--accent-bright); }
.search-option.active, .search-option:hover { background: var(--sunken); }
.so-text { display: flex; flex-direction: column; line-height: 1.35; }
.so-title { font-weight: 600; color: var(--heading); }
.so-cat { font-size: .85rem; color: var(--muted); }
.search-empty { padding: 12px; color: var(--muted); }

/* ---------- Layout and slide-out categories panel ---------- */
.layout { padding-top: 28px; }
.content { min-width: 0; }
.cat-drawer { display: none; }
@media (min-width: 1024px) {
  /* keep page content clear of the closed tab on narrower desktops */
  main:has(.cat-drawer) .wrap { padding-left: max(var(--gutter), 60px); }
  .cat-drawer {
    --panel-w: 268px;
    display: flex; align-items: flex-start;
    position: fixed; left: 0; top: calc(var(--header-h) + 32px + env(safe-area-inset-top, 0px)); z-index: 25;
    transform: translateX(calc(-1 * var(--panel-w)));
    transition: transform .28s cubic-bezier(.2, .8, .2, 1);
  }
  .cat-drawer.open { transform: translateX(0); }
  .cat-panel {
    width: var(--panel-w); max-height: calc(100vh - var(--header-h) - 64px); overflow-y: auto;
    background: var(--surface); border: 1px solid var(--border); border-left: 0; border-radius: 0 0 var(--r-lg) 0;
    box-shadow: var(--shadow-lg); padding: 14px 10px;
    visibility: hidden; transition: visibility 0s .28s;
  }
  .cat-drawer.open .cat-panel { visibility: visible; transition: visibility 0s; }
  .cat-tab {
    order: 2; display: inline-flex; flex-direction: column; align-items: center; gap: 10px;
    padding: 14px 9px; border: 0; border-radius: 0 12px 12px 0; cursor: pointer;
    background: var(--primary); color: var(--on-primary); font: inherit; font-weight: 700; font-size: .92rem;
    box-shadow: var(--shadow); transition: background-color .2s;
  }
  .cat-tab .ic { width: 18px; height: 18px; flex: none; }
  .cat-tab-text { writing-mode: vertical-rl; transform: rotate(180deg); letter-spacing: .02em; white-space: nowrap; }
  .cat-drawer.open .cat-tab, .cat-tab:hover { background: var(--accent-bright); color: #fff; }
  .cat-tab:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
}
@media (prefers-reduced-motion: reduce) { .cat-drawer, .cat-panel { transition: none !important; } }
.cat-panel .sb-title { font-size: .82rem; color: var(--muted); font-weight: 700; margin: 4px 12px 8px; letter-spacing: .02em; }
.cat-panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.cat-panel a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); color: var(--text); text-decoration: none; font-weight: 500; border-left: 3px solid transparent; }
.cat-panel a .ic { color: var(--accent-bright); width: 20px; height: 20px; }
.cat-panel a:hover { background: var(--sunken); }
.cat-panel a[aria-current="page"] { background: var(--accent-soft); color: var(--heading); font-weight: 700; border-left-color: var(--gold); }
.sb-count { margin-left: auto; font-size: .8rem; color: var(--muted); background: var(--sunken); border-radius: 999px; padding: 1px 8px; font-weight: 600; }
.cat-panel a[aria-current="page"] .sb-count { background: var(--surface); }

/* ---------- Hero with smart drop zone ---------- */
.hero { background: var(--hero); border-bottom: 1px solid var(--border); padding: clamp(32px, 5vw, 64px) 0 clamp(28px, 4vw, 52px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.hero-main { padding-top: clamp(0px, 2vw, 28px); }
.hero-title { font-size: clamp(1.9rem, 1.1rem + 3vw, 3.1rem); line-height: 1.24; margin-bottom: .45em; letter-spacing: -.005em; }
.hero-title::before { content: ""; display: block; width: 48px; height: 4px; border-radius: 2px; background: var(--gold); margin-bottom: 18px; }
.hero-text { font-size: clamp(1.03rem, 1rem + .3vw, 1.18rem); color: var(--muted); max-width: 34em; margin-bottom: 20px; }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.hero-points li { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--heading); font-size: .97rem; }
.hero-points .ic { color: var(--accent-bright); }
.hero-drop-wrap { display: grid; gap: 12px; }
.hero-drop {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
  background: var(--surface); border: 2px dashed var(--accent-bright); border-radius: var(--r-lg);
  padding: clamp(28px, 4vw, 44px) 24px; box-shadow: var(--shadow-lg); transition: background-color .15s, border-color .15s;
}
.hero-drop.dragging { background: var(--accent-soft); border-color: var(--accent); }
.hd-icon { display: inline-flex; width: 64px; height: 64px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-bright); align-items: center; justify-content: center; }
.hd-icon .ic { width: 30px; height: 30px; }
.hd-title { margin: 0; font-weight: 700; font-size: 1.15rem; color: var(--heading); }
.hero-drop .btn { min-width: 220px; }
.hd-types { margin: 0; color: var(--muted); font-size: .92rem; }
.hd-privacy { margin: 4px 0 0; display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-size: .9rem; font-weight: 600; }
.drop-results:empty { display: none; }
.drop-results { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px; box-shadow: var(--shadow); display: grid; gap: 12px; }
.dr-ask { margin: 0; font-weight: 700; color: var(--heading); overflow-wrap: anywhere; }
.dr-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.dr-tool { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; text-decoration: none; color: var(--heading); font-weight: 600; min-height: 52px; }
.dr-tool:hover, .dr-tool:focus-visible { border-color: var(--accent-bright); background: var(--accent-soft); }
.dr-tool .tool-icon { width: 34px; height: 34px; }
.drop-results .link-btn { justify-self: start; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

/* ---------- Sections ---------- */
.section { padding: 8px 0 36px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.section-head h2, .section-title { margin: 0; }
.section-title { margin-bottom: 20px; }
.section-head h2::after, .section-title::after { content: ""; display: block; width: 36px; height: 3px; border-radius: 2px; background: var(--gold); margin-top: 8px; }
.page-head { padding: 4px 0 12px; }
.page-head p { color: var(--muted); max-width: 42em; }
.tool-group { margin-bottom: 30px; content-visibility: auto; contain-intrinsic-size: auto 420px; }
.group-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.group-head h3 { margin: 0; font-size: 1.15rem; }
.group-head h3 a { color: var(--heading); text-decoration: none; }
.group-head h3 a:hover { color: var(--accent); text-decoration: underline; }
.group-head p { margin: 2px 0 0; color: var(--muted); font-size: .95rem; }
.more-link { margin-top: 14px; font-weight: 600; }
.how, .faq-section { content-visibility: auto; contain-intrinsic-size: auto 360px; }

/* ---------- Category slider (home) ---------- */
.group-head { flex-wrap: wrap; }
.group-text { flex: 1 1 260px; min-width: 0; }
.slider-controls { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.slider-controls.no-scroll .slider-btn { display: none; }
.slider-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--heading); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: border-color .15s, background-color .15s; }
.slider-btn:hover:not(:disabled) { border-color: var(--accent-bright); background: var(--accent-soft); }
.slider-btn:disabled { opacity: .35; cursor: default; }
.slider-btn .ic { width: 20px; height: 20px; }
.slider-all { font-weight: 600; font-size: .92rem; padding: 8px 4px; white-space: nowrap; }
.slider { position: relative; }
.slider-track {
  list-style: none; margin: 0; padding: 4px 2px 12px;
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 14px) / 3.35); gap: 14px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: 2px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.slider-track::-webkit-scrollbar { display: none; }
.slide { scroll-snap-align: start; display: flex; min-width: 0; }
.slide .tool-card { width: 100%; }
.slider-track.dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.slider-track.dragging .tool-card { pointer-events: none; }
.slider::before, .slider::after { content: ""; position: absolute; top: 0; bottom: 12px; width: 44px; pointer-events: none; transition: opacity .2s; z-index: 1; }
.slider::before { left: 0; background: linear-gradient(to left, transparent, var(--bg)); }
.slider::after { right: 0; background: linear-gradient(to right, transparent, var(--bg)); }
.slider.at-start::before, .slider.at-end::after { opacity: 0; }
@media (max-width: 1100px) { .slider-track { grid-auto-columns: calc((100% - 14px) / 2.3); } }
@media (max-width: 640px) {
  .slider-track { grid-auto-columns: 80%; gap: 12px; }
  .slider-all { display: none; }
}


/* ---------- Tool cards ---------- */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 14px; }
.tool-card {
  position: relative; display: flex; gap: 14px; align-items: flex-start;
  padding: 16px 38px 16px 16px; border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--surface); text-decoration: none; color: var(--text);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.tool-card:hover { border-color: var(--accent-bright); box-shadow: var(--shadow); transform: translateY(-2px); }
.tool-card .chev { position: absolute; right: 12px; top: 18px; color: var(--border-strong); }
.tool-card:hover .chev { color: var(--accent-bright); }
.tool-icon { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 11px; background: var(--accent-soft); color: var(--accent-bright); flex: none; }
.tool-icon .ic { width: 22px; height: 22px; }
.tool-icon.lg { width: 54px; height: 54px; border-radius: var(--r-md); }
.tool-icon.lg .ic { width: 28px; height: 28px; }
.tool-text { display: flex; flex-direction: column; min-width: 0; }
.tool-title { font-weight: 700; color: var(--heading); line-height: 1.35; }
.tool-alt { font-size: .85rem; color: var(--muted); line-height: 1.3; }
.tool-desc { font-size: .93rem; color: var(--muted); line-height: 1.5; margin-top: 4px; }
.tool-grid.view-list { grid-template-columns: 1fr; gap: 8px; }
.tool-grid.view-list .tool-card { padding-block: 12px; align-items: center; }
.tool-grid.view-list .tool-text { flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 12px; }
.tool-grid.view-list .tool-desc { margin: 0; flex-basis: 100%; }
.tool-grid.view-list .chev { top: 50%; transform: translateY(-50%); }

/* ---------- Steps ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
.step-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.step-num { display: inline-flex; width: 34px; height: 34px; border-radius: 50%; align-items: center; justify-content: center; background: var(--primary); color: var(--on-primary); font-weight: 700; flex: none; }
.step-top .ic { color: var(--accent-bright); width: 26px; height: 26px; }
.step p { color: var(--muted); margin: 0; }

/* ---------- Privacy band ---------- */
.privacy-band { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: start; background: var(--sunken); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 24px; margin-bottom: 36px; }
.privacy-band h2 { margin-bottom: .3em; }
.privacy-band p { color: var(--muted); }
.promise-icon { display: inline-flex; width: 46px; height: 46px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent-bright); align-items: center; justify-content: center; }
.promise-icon .ic { width: 24px; height: 24px; }

/* ---------- FAQ ---------- */
.faq { max-width: 880px; border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { list-style: none; cursor: pointer; padding: 16px 40px 16px 0; position: relative; font-weight: 600; color: var(--heading); min-height: 48px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { margin: 0 0 16px; color: var(--muted); max-width: 46em; }

/* ---------- All tools controls ---------- */
.tools-controls { display: grid; gap: 16px; margin: 8px 0 28px; }
.tools-controls .search { max-width: 560px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; font-weight: 500; }
.chip[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.controls-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tool-count { margin: 0; color: var(--muted); font-weight: 600; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { min-height: 38px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; color: var(--muted); font-weight: 600; }
.seg button[aria-pressed="true"] { background: var(--sunken); color: var(--heading); }
.tool-section { margin-bottom: 36px; }
.tool-section h2 { font-size: 1.2rem; }
.empty { color: var(--muted); padding: 24px 0; }

/* ---------- Tool page ---------- */
.breadcrumb { padding-top: 4px; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; font-size: .92rem; color: var(--muted); }
.breadcrumb li:not(:last-child)::after { content: "/"; margin-left: 6px; color: var(--border-strong); }
.breadcrumb a { color: var(--muted); }
.tool-head { padding-bottom: 8px; }
.tool-title-row { display: flex; align-items: center; gap: 14px; margin: 16px 0 10px; }
.tool-title-row h1 { margin: 0; }
.lead { color: var(--muted); font-size: 1.08rem; max-width: 44em; }

.workspace {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: clamp(16px, 3vw, 28px); box-shadow: var(--shadow); margin-top: 8px;
}
.privacy-note { display: flex; align-items: flex-start; gap: 10px; color: var(--muted); font-size: .95rem; margin: 14px 4px 0; }
.privacy-note .ic { color: var(--accent); margin-top: 3px; }

.tool-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px 40px; padding-top: 44px; padding-bottom: 8px; }
.tool-info .tool-faq, .tool-info .related { grid-column: 1 / -1; }
.tool-info section { margin-bottom: 28px; }
.tool-info h2 { font-size: 1.2rem; }
.how-list { padding-left: 1.4em; margin: 0; }
.how-list li { margin-bottom: 8px; padding-left: 4px; }
.how-list li::marker { color: var(--accent); font-weight: 700; }
.spec-list { list-style: none; padding: 0; margin: 0; }
.spec-list li { padding: 8px 0; border-bottom: 1px solid var(--border); }
.tool-info .faq { border-top: 1px solid var(--border); }
.related { grid-column: 1 / -1; }

/* ---------- Uploader ---------- */
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  gap: 10px; padding: clamp(28px, 6vw, 48px) 20px; border: 2px dashed var(--border-strong);
  border-radius: var(--r-md); background: var(--sunken);
  transition: border-color .15s, background-color .15s;
}
.dz-icon { display: inline-flex; width: 56px; height: 56px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); align-items: center; justify-content: center; }
.dz-icon .ic { width: 28px; height: 28px; }
.dz-hint, .dz-accepts { margin: 0; color: var(--muted); font-size: .95rem; }
.dz-accepts { font-size: .88rem; }
.uploader.dragging .dropzone { border-color: var(--accent); background: var(--accent-soft); }
.dropzone.compact { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; padding: 14px; gap: 12px; text-align: left; }
.dropzone.compact .dz-icon, .dropzone.compact .dz-hint { display: none; }
.dropzone.compact .btn { min-height: 46px; }
@media (hover: none) { .dz-hint { display: none; } }

.file-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.file-list:empty { display: none; }
.file-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 8px 10px 12px;
  border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface);
}
.file-item.status-error { border-color: var(--danger); background: var(--danger-soft); }
.file-item.dragging-item { opacity: .5; }
.file-item.drop-target { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.drag-handle { color: var(--border-strong); cursor: grab; display: none; }
@media (hover: hover) and (pointer: fine) { .drag-handle { display: inline-flex; } }
.file-icon { color: var(--accent); display: inline-flex; }
.status-error .file-icon { color: var(--danger); }
.file-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.file-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--heading); }
.file-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .88rem; color: var(--muted); }
.file-status { display: inline-flex; align-items: center; gap: 4px; }
.status-ready .file-status { color: var(--success); font-weight: 600; }
.status-error .file-status { color: var(--danger); font-weight: 600; white-space: normal; }
.status-checking .file-status { color: var(--muted); }
.status-ic { width: 1em; height: 1em; }
.file-actions { display: flex; gap: 2px; flex: none; }
.file-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; }
.file-bar:empty { display: none; }
.link-btn { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 8px 4px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Options ---------- */
.ws-options:not(:empty) { margin-top: 22px; display: grid; gap: 20px; }
.opt-hint { color: var(--muted); margin: 0; font-size: .97rem; }
.opt-summary { margin: 0; font-weight: 600; display: flex; gap: 16px; flex-wrap: wrap; }
fieldset.choice { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.choice legend, .field label.label { font-weight: 600; color: var(--heading); margin-bottom: 8px; padding: 0; }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-opt { position: relative; }
.choice-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice-opt > span { display: flex; flex-direction: column; justify-content: center; min-height: 48px; padding: 6px 16px; border: 1.5px solid var(--border-strong); border-radius: 10px; background: var(--surface); font-weight: 500; line-height: 1.35; }
.choice-opt input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--heading); font-weight: 600; box-shadow: inset 0 0 0 1px var(--accent); }
.choice-opt input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.choice-label { display: inline-flex; align-items: center; gap: 8px; }
.choice-desc { font-size: .84rem; font-weight: 400; color: var(--muted); }
.swatch { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); flex: none; }
.field { display: grid; gap: 6px; max-width: 520px; }
.field .label { display: block; }
.field input[type="text"], .field input[type="number"] {
  min-height: 50px; padding: 0 14px; border: 1.5px solid var(--border-strong); border-radius: 10px; background: var(--surface); width: 100%;
}
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.field .hint { font-size: .9rem; color: var(--muted); margin: 0; }
.check { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
.preview-line { margin: 0; font-weight: 600; color: var(--accent); }

.ws-actions { margin-top: 24px; display: grid; gap: 12px; }
.btn-run { width: 100%; }
@media (min-width: 700px) { .btn-run { width: auto; justify-self: start; min-width: 260px; } }
.inline-error { margin: 0; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: var(--danger-soft); color: var(--danger); font-weight: 500; }
.inline-error .ic { margin-top: 3px; }

/* ---------- Organize ---------- */
.org-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.org-bar p { margin: 0; }
.page-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.page-card { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.page-card.drop-target { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.page-card.dragging-item { opacity: .45; }
.page-thumb { position: relative; aspect-ratio: 1 / 1; background: var(--sunken); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.page-thumb img { position: absolute; max-width: 86%; max-height: 86%; box-shadow: 0 1px 4px rgba(0,0,0,.18); background: #fff; transition: transform .2s; }
.thumb-loading { width: 52%; aspect-ratio: 3 / 4; background: var(--border); border-radius: 4px; animation: pulse 1.2s ease-in-out infinite alternate; }
.thumb-label { font-size: 2rem; font-weight: 700; color: var(--border-strong); }
@keyframes pulse { from { opacity: .45; } to { opacity: 1; } }
.page-tools { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; }
.page-tools .btn-icon { width: 38px; height: 38px; background: var(--surface); border-color: var(--border); color: var(--heading); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.page-tools .btn-icon.danger:hover { color: var(--danger); }
.page-foot { display: flex; align-items: center; justify-content: space-between; padding: 2px; border-top: 1px solid var(--border); }
.page-label { font-size: .9rem; font-weight: 600; color: var(--heading); }
.notice { margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--sunken); color: var(--muted); }

/* ---------- Progress, result, error ---------- */
.ws-progress, .ws-result, .ws-error { display: grid; gap: 18px; padding: 8px 0; }
.ws-progress h2, .ws-result h2, .ws-error h2 { margin: 0; font-size: 1.35rem; }
.bar { height: 10px; border-radius: 999px; background: var(--sunken); border: 1px solid var(--border); overflow: hidden; }
.bar-fill { height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .2s; }
.bar.indeterminate .bar-fill { width: 35%; animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
.progress-text { margin: 0; color: var(--muted); font-weight: 600; }
.result-head, .error-head { display: flex; align-items: center; gap: 14px; }
.result-icon, .error-icon { display: inline-flex; width: 52px; height: 52px; border-radius: 50%; align-items: center; justify-content: center; flex: none; }
.result-icon { background: var(--success-soft); color: var(--success); }
.error-icon { background: var(--danger-soft); color: var(--danger); }
.result-icon .ic, .error-icon .ic { width: 28px; height: 28px; }
.result-file { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--sunken); }
.result-file > .ic { color: var(--accent); width: 26px; height: 26px; }
.result-file div { min-width: 0; display: flex; flex-direction: column; }
.zip-list { font-size: .93rem; color: var(--muted); }
.zip-list p { margin: 0 0 4px; }
.zip-list ul { margin: 0; padding-left: 1.2em; }
.result-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.result-actions .btn { flex: 1 1 220px; }
@media (min-width: 700px) { .result-actions .btn { flex: 0 0 auto; } }
.error-msg { margin: 0; font-size: 1.05rem; }
.next-tools h3 { font-size: 1rem; margin-bottom: 10px; }
.next-tools .tool-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* ---------- Prose pages ---------- */
.prose { max-width: 820px; padding-top: clamp(28px, 4vw, 48px); padding-bottom: 48px; }
.prose section { margin-top: 28px; }
.prose h2 { font-size: 1.2rem; }
.prose p { color: var(--text); }

/* ---------- Footer ---------- */
.site-footer { margin-top: 56px; background: var(--footer-bg); color: var(--footer-text); padding: 48px 0 24px; border-top: 4px solid var(--gold); }
.footer-grid { display: grid; grid-template-columns: 1.7fr repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer-grid h2 { font-size: .95rem; margin-bottom: 12px; color: #fff; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid ul a { color: var(--footer-text); text-decoration: none; display: inline-block; padding: 2px 0; }
.footer-grid ul a:hover { color: #fff; text-decoration: underline; }
.site-footer .brand { --logo-h: 40px; color: #fff; }
.footer-brand p { margin: 12px 0 0; max-width: 30em; }
.footer-brand .lang-switch { margin-top: 18px; border-color: rgba(255,255,255,.25); }
.footer-brand .lang-switch a { color: var(--footer-text); }
.footer-brand .lang-switch a[aria-current="true"] { background: #fff; color: #102C3A; }
.footer-bottom { margin-top: 36px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.14); font-size: .9rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- Toasts ---------- */
.toasts { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); transform: translateX(-50%); z-index: 50; display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 10px; background: var(--toast-bg); color: var(--toast-text); box-shadow: var(--shadow); font-weight: 500; animation: toastIn .2s ease-out; }
.toast.out { opacity: 0; transition: opacity .3s; }
.toast-error .ic { color: #F59A92; }
.toast-success .ic { color: #6BD69C; }
:root[data-theme="dark"] .toast-error .ic { color: var(--danger-soft); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Phase 2 additions ---------- */
.file-thumb { width: 44px; height: 44px; flex: none; border-radius: 8px; overflow: hidden; background: var(--sunken); border: 1px solid var(--border); }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.summary { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.summary > div { padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.summary dt { font-size: .85rem; color: var(--muted); }
.summary dd { margin: 2px 0 0; font-weight: 700; color: var(--heading); font-size: 1.05rem; overflow-wrap: anywhere; }
.summary.meta { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.summary.meta dd { font-weight: 600; font-size: 1rem; }
.summary dd.muted { color: var(--muted); font-weight: 400; }
.meta-heading { font-size: 1.15rem; margin: 0; }
.note { margin: 0; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; }
.note .ic { margin-top: 3px; }
.note-info { background: var(--sunken); color: var(--text); }
.note-info .ic { color: var(--accent); }
.note-success { background: var(--success-soft); color: var(--success); font-weight: 500; }
.note-warn { background: #FFF4DB; color: #7A4B00; }
:root[data-theme="dark"] .note-warn { background: #3A2E12; color: #F5D38A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .note-warn { background: #3A2E12; color: #F5D38A; } }
.result-icon.neutral { background: var(--sunken); color: var(--accent); }
.preview-box { display: grid; gap: 8px; }
.preview-box .label { font-weight: 600; color: var(--heading); }
.preview-box .btn { justify-self: start; }
.text-preview { width: 100%; min-height: 220px; padding: 12px 14px; border: 1.5px solid var(--border-strong); border-radius: 10px; background: var(--surface); line-height: 1.6; resize: vertical; }
/* Headings receive focus after navigation (for screen readers); no ring needed there. */
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus { outline: none; }

/* ---------- Phase 3 additions ---------- */
.stack { display: grid; gap: 20px; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 520px; }
.field-row .field { max-width: none; }
.color-input { width: 72px; height: 48px; padding: 4px; border: 1.5px solid var(--border-strong); border-radius: 10px; background: var(--surface); cursor: pointer; }
.field select { min-height: 50px; padding: 0 12px; border: 1.5px solid var(--border-strong); border-radius: 10px; background: var(--surface); width: 100%; }
.field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.file-thumb img { transition: transform .2s; }

/* Results table */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
.result-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.result-table th, .result-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.result-table th { background: var(--sunken); color: var(--heading); font-weight: 600; }
.result-table td:first-child { white-space: normal; overflow-wrap: anywhere; min-width: 140px; }
.result-table tr:last-child td { border-bottom: 0; }

/* Cropper */
.crop-wrap { display: flex; justify-content: center; background: var(--sunken); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px; }
.crop-stage { position: relative; display: inline-block; line-height: 0; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.crop-stage img { display: block; max-width: 100%; max-height: 62vh; width: auto; height: auto; pointer-events: none; }
.crop-box { position: absolute; border: 2px solid #fff; outline: 1px solid rgba(0,0,0,.6); box-shadow: 0 0 0 9999px rgba(12, 19, 32, .55); cursor: move; touch-action: none; }
.crop-box:focus-visible { outline: 3px solid var(--accent); outline-offset: 0; }
.crop-handle { position: absolute; width: 26px; height: 26px; background: #fff; border: 2px solid var(--accent); border-radius: 50%; touch-action: none; }
.crop-handle.h-nw { left: -13px; top: -13px; cursor: nwse-resize; }
.crop-handle.h-ne { right: -13px; top: -13px; cursor: nesw-resize; }
.crop-handle.h-sw { left: -13px; bottom: -13px; cursor: nesw-resize; }
.crop-handle.h-se { right: -13px; bottom: -13px; cursor: nwse-resize; }

/* Text to PDF editor */
.editor { display: grid; gap: 14px; }
.editor .label { font-weight: 600; color: var(--heading); }
.editor-text { width: 100%; min-height: 260px; padding: 14px 16px; border: 1.5px solid var(--border-strong); border-radius: 12px; background: var(--surface); line-height: 1.75; resize: vertical; font-family: "Noto Sans Ethiopic", "IBM Plex Sans", "Nyala", sans-serif; }
.editor-text:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.editor-opts { display: grid; gap: 18px; }
.export-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.export-opt { display: grid; gap: 8px; align-content: start; }
.export-opt .btn { width: 100%; }
.export-opt .hint { margin: 0; font-size: .9rem; color: var(--muted); }
.print-frame { position: fixed; width: 0; height: 0; border: 0; left: -10px; top: -10px; }

/* Calendar */
.cal-today { margin: 0 0 18px; padding: 12px 14px; border-radius: 10px; background: var(--accent-soft); color: var(--heading); }
.cal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; margin-bottom: 14px; }
.cal-panel { border: 1px solid var(--border); border-radius: var(--r-md); padding: 18px; display: grid; gap: 14px; background: var(--surface); }
.cal-panel h2 { font-size: 1.1rem; margin: 0; }
.cal-inputs { display: grid; grid-template-columns: 1fr 1.6fr 1.1fr; gap: 10px; }
.cal-inputs .field { max-width: none; }
.cal-inputs input { min-height: 50px; padding: 0 12px; border: 1.5px solid var(--border-strong); border-radius: 10px; background: var(--surface); width: 100%; }
.cal-inputs input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cal-result { display: grid; gap: 4px; padding: 14px; border-radius: 10px; background: var(--sunken); min-height: 64px; }
.cal-result.bad { background: var(--danger-soft); color: var(--danger); }
.cal-main { font-size: 1.15rem; font-weight: 700; color: var(--heading); }
@media (max-width: 420px) { .cal-inputs { grid-template-columns: 1fr 1fr; } .cal-inputs .field:nth-child(2) { grid-column: 1 / -1; grid-row: 1; } }

/* ---------- Phase 4 additions ---------- */
.badge { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-size: .78rem; font-weight: 700; vertical-align: middle; background: #FFF1D6; color: #7A4B00; border: 1px solid #F0D49B; line-height: 1.6; }
.badge-lg { font-size: .85rem; padding: 2px 10px; margin-left: 4px; }
:root[data-theme="dark"] .badge { background: #3A2E12; color: #F5D38A; border-color: #5C4A1E; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .badge { background: #3A2E12; color: #F5D38A; border-color: #5C4A1E; } }
.beta-note { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); font-size: .95rem; margin-top: -4px; }
.beta-note .ic { color: #B7791F; margin-top: 3px; }
.status-line { margin: 0; min-height: 1.5em; }
.docx-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .92rem; color: var(--muted); }
.note-inline { color: #7A4B00; }
.docx-preview { max-height: 70vh; overflow: auto; background: var(--sunken); border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px; }
.docx-paper { background: #fff; color: #111; margin: 0 auto; padding-top: 32px !important; padding-bottom: 32px !important; box-shadow: 0 1px 4px rgba(0,0,0,.15); font-family: "Noto Sans Ethiopic", "Nyala", Calibri, Arial, sans-serif; font-size: 11pt; }
.docx { line-height: 1.5; color: #111; overflow-wrap: anywhere; }
.docx p, .docx h1, .docx h2, .docx h3, .docx h4, .docx h5, .docx h6 { margin: 0 0 .55em; color: #111; }
.docx h1 { font-size: 1.9em; } .docx h2 { font-size: 1.5em; } .docx h3 { font-size: 1.25em; } .docx h4, .docx h5, .docx h6 { font-size: 1.05em; }
.docx span { white-space: pre-wrap; }
.docx .li { text-indent: -18px; } .docx .li-mark { display: inline-block; width: 18px; text-indent: 0; }
.docx table { border-collapse: collapse; margin: 0 0 .8em; max-width: 100%; }
.docx td { border: 1px solid #777; padding: 4px 7px; vertical-align: top; }
.docx td.merged { border-top-color: transparent; }
.docx td p:last-child { margin-bottom: 0; }
.docx img { max-width: 100%; height: auto; }
.docx .link { color: #1F4E8C; text-decoration: underline; }
.docx p.empty { margin: 0; }
.docx .pb { border-top: 2px dashed #C9CED6; margin: 18px -12px; }
.dev .result-table td:last-child { white-space: normal; min-width: 260px; }
@media (hover: none) { .hd-title { display: none; } }

/* ---------- Phase 6 additions ---------- */
.cam-btn { display: none; }
@media (pointer: coarse) { .cam-btn { display: inline-flex; } }
.id-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.id-side h3 { font-size: 1rem; margin: 0 0 8px; }
.zip-entries { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.zip-entries li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.ze-name { display: flex; flex-direction: column; min-width: 0; }
.ze-name .file-name { white-space: normal; overflow-wrap: anywhere; }
.ze-dl { flex: none; min-height: 42px; }
.ze-bad { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .9rem; flex: none; }
.page-tools .btn-icon { width: 34px; height: 34px; }

.search-list{display:flex;flex-wrap:wrap;gap:8px;list-style:none;padding:0;margin:0}.search-list li{padding:4px 12px;border:1px solid rgba(127,127,127,.35);border-radius:999px;font-size:.9rem}.tool-guide{margin-top:8px}.tool-guide p{max-width:68ch;line-height:1.75;margin:0 0 14px}
