/* Jinsiyati design system: American civic identity. Old Glory blue & red, white, a star seal and flag stripes. */

/* Fonts served from the site itself (Cairo and Libre Baskerville, SIL Open Font License): pages don't wait on Google. */
/* arabic */
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/cairo-arabic.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-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, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
/* latin-ext */
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/cairo-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/cairo-latin.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;
}
/* arabic */
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/cairo-arabic.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-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, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
/* latin-ext */
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/cairo-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/cairo-latin.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;
}
/* arabic */
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/cairo-arabic.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-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, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
/* latin-ext */
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/cairo-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/cairo-latin.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;
}
/* arabic */
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/cairo-arabic.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-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, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
/* latin-ext */
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/cairo-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/cairo-latin.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;
}
/* arabic */
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(fonts/cairo-arabic.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-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, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
/* latin-ext */
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(fonts/cairo-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(fonts/cairo-latin.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;
}
/* arabic */
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url(fonts/cairo-arabic.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-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, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
/* latin-ext */
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url(fonts/cairo-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url(fonts/cairo-latin.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;
}
/* latin-ext */
@font-face {
  font-family: 'Libre Baskerville';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/libre-baskerville-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Libre Baskerville';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/libre-baskerville-latin.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;
}
/* latin-ext */
@font-face {
  font-family: 'Libre Baskerville';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/libre-baskerville-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Libre Baskerville';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/libre-baskerville-latin.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;
}

:root {
  --bg: #f7f5f0;               /* warm paper white */
  --surface: #ffffff;
  --surface-2: #f8f7f3;
  --text: #0b1a33;
  --text-2: #2c3a55;
  --muted: #66708a;
  --border: #e4e0d6;
  --primary: #0a3161;          /* Old Glory Blue */
  --primary-700: #061f3f;
  --primary-50: #edf1f8;
  --primary-100: #d6e0ef;
  --on-primary: #ffffff;
  --red: #b31942;              /* Old Glory Red */
  --red-700: #8a1132;
  --red-50: #fbecef;
  --green: #18794e;
  --green-700: #0f5c3a;
  --green-50: #e8f5ee;
  --amber: #b31942;
  --amber-700: #8a1132;
  --amber-50: #fbecef;
  --violet: #0a3161;
  --violet-50: #edf1f8;
  --teal: #0a3161;
  --teal-50: #edf1f8;
  --gold: #c9a227;
  --gold-50: #fbf5e3;
  --gold-700: #7a5a00;
  --hero: #0a3161;
  --stars: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cpath d='M14 8l1.8 3.7 4 .6-2.9 2.8.7 4L14 17.2l-3.6 1.9.7-4-2.9-2.8 4-.6zM42 36l1.8 3.7 4 .6-2.9 2.8.7 4-3.6-1.9-3.6 1.9.7-4-2.9-2.8 4-.6z' fill='%23ffffff' fill-opacity='.09'/%3E%3C/svg%3E");
  --shadow-sm: 0 1px 2px rgba(11, 26, 51, .06);
  --shadow: 0 1px 2px rgba(11, 26, 51, .05), 0 6px 18px -10px rgba(11, 26, 51, .18);
  --shadow-lg: 0 22px 44px -18px rgba(10, 49, 97, .45);
  --radius: 16px;
  --radius-sm: 10px;
  --header-bg: rgba(255, 255, 255, .92);
  --serif: "Libre Baskerville", Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #071225;
    --surface: #0e1d38;
    --surface-2: #0b1730;
    --text: #eef2f9;
    --text-2: #c6d0e3;
    --muted: #8b98b4;
    --border: #1d2e50;
    --primary: #7fa2e0;
    --primary-700: #4f74b8;
    --primary-50: #13264a;
    --primary-100: #1c3462;
    --on-primary: #071225;
    --red: #ef5a7a;
    --red-700: #c73a5b;
    --red-50: #3a1322;
    --green: #4cc38a;
    --green-700: #2c9a66;
    --green-50: #0f2e20;
    --amber: #ef5a7a;
    --amber-700: #ef5a7a;
    --amber-50: #3a1322;
    --violet: #7fa2e0;
    --violet-50: #13264a;
    --teal: #7fa2e0;
    --teal-50: #13264a;
    --hero: #0a3161;
    --gold-50: #2e2610;
    --gold-700: #e6c35a;
    --shadow-sm: none;
    --shadow: 0 0 0 1px rgba(255, 255, 255, .02);
    --shadow-lg: 0 24px 48px -16px rgba(0, 0, 0, .6);
    --header-bg: rgba(7, 18, 37, .92);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Cairo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { display: block; }
.en { direction: ltr; unicode-bidi: isolate; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }
.center { text-align: center; }
.bold { font-weight: 700; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--primary-100); outline-offset: 2px; border-radius: 8px; }

/* icons */
.i { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; }
.i.sm { width: 16px; height: 16px; }
.i.lg { width: 26px; height: 26px; }
.i.xl { width: 34px; height: 34px; }
.chip-icon {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none;
  background: var(--primary-50); color: var(--primary);
}
.chip-icon.red { background: var(--red-50); color: var(--red); }
.chip-icon.green { background: var(--green-50); color: var(--green); }
.chip-icon.amber { background: var(--amber-50); color: var(--amber-700); }
.chip-icon.violet { background: var(--violet-50); color: var(--violet); }
.chip-icon.teal { background: var(--teal-50); color: var(--teal); }
.chip-icon.lg { width: 60px; height: 60px; border-radius: 18px; }

/* ---------- layout ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px clamp(16px, 4vw, 32px);
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary); color: #fff; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--red);
}
.brand-mark .i { fill: #fff; stroke: #fff; width: 18px; height: 18px; }
.topbar::after { content: ""; position: absolute; inset-inline: 0; bottom: -7px; height: 6px;
  background: linear-gradient(var(--red) 0 2px, #fff 2px 4px, var(--red) 4px 6px); }
.nav { display: flex; gap: 2px; align-items: center; }
.nav a {
  display: flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; font-size: 15px;
  padding: 8px 12px; border-radius: 12px;
}
.nav a:hover { text-decoration: none; color: var(--text); background: var(--surface-2); }
.nav a.active { color: var(--primary); background: var(--primary-50); }
.nav a.btn.primary, .nav a.btn.primary:hover { color: var(--on-primary); background: var(--primary); padding: 7px 16px; }
.container { max-width: 1040px; margin: 0 auto; padding: 24px clamp(16px, 4vw, 32px) 110px; }
.container.narrow { max-width: 720px; }
.bottom-nav {
  position: fixed; bottom: 0; inset-inline: 0; z-index: 30; display: none;
  justify-content: space-around; gap: 2px;
  background: var(--header-bg); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--border); padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--muted); font-size: 11px; font-weight: 700; padding: 6px 2px; border-radius: 14px;
}
.bottom-nav a:hover { text-decoration: none; }
.bottom-nav a .i { width: 22px; height: 22px; }
.bottom-nav a.active { color: var(--primary); background: var(--primary-50); }
@media (max-width: 820px) {
  .topbar .nav.learner { display: none; }
  .bottom-nav { display: flex; }
}
h1 { font-size: clamp(24px, 4vw, 30px); font-weight: 800; margin: 0 0 6px; line-height: 1.35; letter-spacing: -.2px; }
h2 { font-size: 20px; font-weight: 800; margin: 0 0 12px; line-height: 1.4; }
h3 { font-size: 17px; font-weight: 700; margin: 0 0 4px; line-height: 1.45; }
p { margin: 0 0 10px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head p { margin: 0; color: var(--muted); }
.section-title { display: flex; align-items: center; gap: 10px; margin: 28px 0 12px; }
.section-title h2 { margin: 0; }
.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.grid.four { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.grid.stats { grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.row.center { justify-content: center; }
.stack > * + * { margin-top: 14px; }
.spacer { flex: 1; }

/* ---------- components ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.card.flat { box-shadow: none; }
.card.pad-lg { padding: clamp(20px, 4vw, 32px); }
a.card { display: block; color: inherit; transition: transform .15s ease, box-shadow .15s ease, border-color .15s; }
a.card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--primary-100); }
.tile { display: flex; gap: 14px; align-items: flex-start; }
.tile h3 { margin-top: 2px; }
.tile p { margin: 0; color: var(--muted); font-size: 14px; }
.tile .go { margin-inline-start: auto; color: var(--muted); align-self: center; }

.btn {
  --b: var(--surface); --bt: var(--text); --bs: var(--border);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; font-size: 16px; line-height: 1.2; cursor: pointer; text-decoration: none;
  padding: 12px 20px; min-height: 48px; border-radius: var(--radius-sm);
  background: var(--b); color: var(--bt); border: 2px solid var(--bs);
  box-shadow: 0 2px 0 var(--bs); transition: transform .06s, box-shadow .06s, filter .15s;
  -webkit-tap-highlight-color: transparent; white-space: nowrap;
}
.btn:hover { text-decoration: none; filter: brightness(1.04); }
.btn:active { transform: translateY(2px); box-shadow: 0 0 0 var(--bs); }
.btn.accent { --b: var(--red); --bt: #fff; --bs: var(--red-700); }
.btn.primary { --b: var(--primary); --bt: var(--on-primary); --bs: var(--primary-700); }
.btn.success { --b: var(--green); --bt: #fff; --bs: var(--green-700); }
.btn.danger { --b: var(--red); --bt: #fff; --bs: var(--red-700); }
.btn.outline-danger { --bt: var(--red); --bs: var(--red-50); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--muted); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.white { --b: #fff; --bt: #0a3161; --bs: rgba(255, 255, 255, .55); }
.btn.glass { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .28); box-shadow: none; }
.btn.small { min-height: 38px; padding: 7px 14px; font-size: 14px; border-radius: 12px; }
.btn.lg { min-height: 56px; font-size: 18px; padding: 14px 28px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.icon-btn {
  display: inline-grid; place-items: center; cursor: pointer; flex: none;
  width: 48px; height: 48px; border-radius: 14px; border: 2px solid var(--border);
  background: var(--surface); color: var(--text-2); box-shadow: 0 3px 0 var(--border);
}
.icon-btn:active { transform: translateY(3px); box-shadow: none; }
.icon-btn.listening { color: #fff; background: var(--red); border-color: var(--red-700); box-shadow: 0 0 0 6px var(--red-50); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 12px transparent; } }

.badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted);
  border: 1px solid var(--border); white-space: nowrap; line-height: 1.6;
}
.badge.blue { background: var(--primary-50); color: var(--primary); border-color: transparent; }
.badge.green { background: var(--green-50); color: var(--green); border-color: transparent; }
.badge.red { background: var(--red-50); color: var(--red); border-color: transparent; }
.badge.amber { background: var(--amber-50); color: var(--amber-700); border-color: transparent; }
.badge.violet { background: var(--violet-50); color: var(--violet); border-color: transparent; }
.badge.solid { background: var(--primary); color: #fff; border-color: transparent; }

.bar { height: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #20c46b, var(--green)); transition: width .4s ease; }
.ring { --p: 0; --size: 92px; width: var(--size); height: var(--size); border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(#fff calc(var(--p) * 1%), rgba(255, 255, 255, .22) 0); flex: none; }
.ring > div { width: calc(var(--size) - 14px); height: calc(var(--size) - 14px); border-radius: 50%; display: grid; place-items: center;
  background: var(--hero); color: #fff; font-weight: 800; font-size: 22px; }

.flash { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 14px; margin-bottom: 14px; font-weight: 600; }
.flash.error { background: var(--red-50); color: var(--red); }
.flash.ok { background: var(--green-50); color: var(--green); }
.flash.info { background: var(--amber-50); color: var(--amber-700); }
.flash a { color: inherit; text-decoration: underline; }
.banner { display: flex; align-items: center; justify-content: center; gap: 8px; text-align: center; margin-top: 6px;
  background: var(--red); color: #fff; padding: 8px 16px; font-size: 14px; font-weight: 700; }
.banner a { color: #fff; text-decoration: underline; }
.banner.warn { background: var(--amber-50); color: var(--amber-700); }
.banner.warn a { color: inherit; }

/* forms */
label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 15px; }
.field { margin-bottom: 16px; }
.hint { font-weight: 500; color: var(--muted); font-size: 13px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=file], select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--text); background: var(--surface-2);
  border: 2px solid var(--border); border-radius: var(--radius-sm); padding: 11px 14px; min-height: 50px;
  transition: border-color .15s, background .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); background: var(--surface); }
textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.ltr { direction: ltr; text-align: left; }
.options { display: grid; gap: 10px; }
.option { position: relative; display: block; margin: 0; cursor: pointer; }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option .box {
  display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 16px;
  border: 2px solid var(--border); background: var(--surface); font-weight: 600; box-shadow: 0 3px 0 var(--border);
}
.option .box small { display: block; color: var(--muted); font-weight: 500; }
.option input:checked + .box { border-color: var(--primary); background: var(--primary-50); box-shadow: 0 3px 0 var(--primary-100); }
.option input:checked + .box .chip-icon { background: var(--primary); color: #fff; }
.check { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; cursor: pointer; margin: 0; }
.check input { width: 20px; height: 20px; accent-color: var(--primary); }
.auth-wrap { min-height: calc(100vh - 140px); display: grid; place-items: center; padding: 16px 0; }
.auth-card { width: 100%; max-width: 460px; }
.auth-card .head { text-align: center; margin-bottom: 18px; }
.auth-card .head .chip-icon { margin: 0 auto 10px; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin: 16px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: start; padding: 12px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { color: var(--muted); font-weight: 700; font-size: 13px; white-space: nowrap; background: var(--surface-2); }
tr:last-child td { border-bottom: none; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--surface-2); }

/* ---------- landing ---------- */
.hero {
  position: relative; overflow: hidden; background: var(--stars), var(--hero); color: #fff;
  padding: clamp(40px, 8vw, 76px) clamp(16px, 4vw, 32px) clamp(56px, 9vw, 96px);
}
.hero::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 18px;
  background: repeating-linear-gradient(var(--red) 0 3px, #fff 3px 6px); opacity: .95; }
.hero-art { width: 100%; max-width: 420px; margin: 0 auto; color: #fff; }
.hero-inner { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; display: grid; gap: 36px; grid-template-columns: 1.1fr .9fr; align-items: center; }
@media (max-width: 860px) { .hero-inner { grid-template-columns: 1fr; } }
.hero h1 { font-size: clamp(32px, 6vw, 52px); line-height: 1.25; font-weight: 900; margin-bottom: 14px; }
.hero h1 .hl { color: #fff; background: linear-gradient(transparent 62%, var(--red) 62% 84%, transparent 84%); padding: 0 4px; }
.hero p.lead { font-size: clamp(17px, 2.4vw, 20px); opacity: .92; max-width: 560px; }
.hero .pill { display: inline-flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25);
  padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; margin-bottom: 16px; }
.hero .trust { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 18px; font-size: 14px; opacity: .9; }
.hero .trust span { display: inline-flex; gap: 6px; align-items: center; }
.demo-card { background: var(--surface); color: var(--text); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-lg); border-top: 5px solid var(--red); }
.demo-card .q { font-family: var(--serif); font-size: 19px; font-weight: 700; color: var(--primary); }
.demo-card .choice { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border: 2px solid var(--border); border-radius: 14px; margin-top: 8px; font-weight: 700; }
.demo-card .choice.right { border-color: var(--green); background: var(--green-50); color: var(--green); }
.stats-strip { max-width: 1040px; margin: -36px auto 0; position: relative; z-index: 2; padding: 0 clamp(16px, 4vw, 32px); }
.stats-strip .card { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; padding: 18px; }
.stats-strip .num { font-size: 30px; font-weight: 900; color: var(--red); line-height: 1.2; }
.steps { counter-reset: step; }
.step { position: relative; }
.step .n { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; background: var(--primary); color: #fff; margin-bottom: 10px; box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--red); }
.price-card { max-width: 440px; margin: 0 auto; text-align: center; border: 2px solid var(--primary); border-top: 6px solid var(--red); position: relative; }
.price-card .ribbon { position: absolute; top: -14px; inset-inline-start: 50%; transform: translateX(50%); background: var(--red); color: #fff; font-weight: 800; font-size: 13px; padding: 4px 14px; border-radius: 999px; }
[dir=ltr] .price-card .ribbon { transform: translateX(-50%); }
.price { font-size: 52px; font-weight: 900; line-height: 1.1; color: var(--primary); }
.compare { max-width: 640px; margin: 0 auto; padding: 6px 0; overflow: hidden; }
.compare-row { display: grid; grid-template-columns: 1fr 84px 84px; gap: 8px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--border); font-weight: 700; }
.compare-row.head { border-top: 0; font-size: 13px; color: var(--muted); text-align: center; }
.compare-row > span:not(:first-child) { text-align: center; }
.compare-row .us { color: var(--primary); }
.compare-row.head .us { font-weight: 900; }
.compare-row .yes { color: var(--green); }
.compare-row .no { color: var(--muted); opacity: .6; }
.compare-row:not(.head) .us { background: var(--primary-50); border-radius: 10px; padding: 4px 0; }
.checklist { list-style: none; padding: 0; margin: 16px 0; text-align: start; display: grid; gap: 8px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; }
.checklist li .i { color: var(--green); margin-top: 3px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 4px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 800; padding: 12px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; color: var(--primary); }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--text-2); }
.cta-band { background: var(--stars), var(--hero); color: #fff; border-radius: var(--radius); padding: clamp(24px, 5vw, 44px); text-align: center; border-bottom: 6px solid var(--red); }
footer.site { text-align: center; color: var(--muted); font-size: 14px; padding: 28px 16px 110px; }

/* ---------- learner home ---------- */
.welcome { background: var(--stars), var(--hero); color: #fff; border-radius: var(--radius); padding: 20px; display: flex; gap: 18px; align-items: center; position: relative; overflow: hidden; border-bottom: 6px solid var(--red); }
.welcome h1 { color: #fff; margin: 0; font-size: 24px; }
.welcome p { margin: 2px 0 0; opacity: .9; }
.welcome .meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.welcome .meta span { display: inline-flex; gap: 6px; align-items: center; background: rgba(255, 255, 255, .16); padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.continue { display: flex; align-items: center; gap: 16px; }
.continue .btn { margin-inline-start: auto; }
@media (max-width: 560px) { .continue { flex-wrap: wrap; } .continue .btn { width: 100%; } }

/* ---------- learning path ---------- */
.unit-head { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--radius); color: #fff; margin: 34px 0 22px; background: var(--stars), var(--primary); border-inline-start: 6px solid var(--red); }
.unit-head h2 { margin: 0; font-size: 19px; }
.unit-head p { margin: 0; opacity: .85; font-size: 14px; }
.unit-head .chip-icon { background: rgba(255, 255, 255, .2); color: #fff; }
.u2, .u4 { background: var(--stars), var(--red); border-inline-start-color: var(--primary); }
.path { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.node { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text); text-align: center; width: 150px; }
.node:hover { text-decoration: none; }
.node .disc {
  width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary); color: #fff; box-shadow: 0 6px 0 var(--primary-700); transition: transform .1s;
  font-weight: 900; font-size: 22px;
}
.node:active .disc { transform: translateY(4px); box-shadow: 0 2px 0 var(--primary-700); }
.node.done .disc { background: var(--green); box-shadow: 0 6px 0 var(--green-700); }
.node.current .disc { background: var(--red); box-shadow: 0 6px 0 var(--red-700); outline: 6px solid var(--red-50); }
.node.locked .disc { background: var(--surface-2); color: var(--muted); box-shadow: 0 6px 0 var(--border); border: 2px solid var(--border); }
.node .label { font-weight: 700; font-size: 14px; line-height: 1.4; }
.node .label small { display: block; color: var(--muted); font-weight: 600; font-size: 12px; }
.path .node:nth-child(4n+1) { transform: translateX(0); }
.path .node:nth-child(4n+2) { transform: translateX(-70px); }
.path .node:nth-child(4n+3) { transform: translateX(0); }
.path .node:nth-child(4n+4) { transform: translateX(70px); }

/* ---------- practice ---------- */
/* focus mode: lessons and tests hide navigation so the learner can concentrate */
body.focus .bottom-nav, body.focus .banner, body.focus .topbar .nav { display: none; }
body.focus .container { padding-bottom: 32px; }
.practice { max-width: 680px; margin: 0 auto; }
.ptop { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.ptop .bar { flex: 1; height: 16px; }
.ptop .count { font-weight: 800; color: var(--muted); font-size: 14px; min-width: 48px; text-align: center; }
.ptitle { font-size: 15px; font-weight: 700; color: var(--muted); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.qcard { text-align: center; padding: clamp(20px, 5vw, 32px); }
.qcard .badges { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
.say { display: flex; align-items: center; justify-content: center; gap: 14px; }
.speak-main {
  width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; cursor: pointer; flex: none;
  background: var(--primary); color: #fff; border: none; box-shadow: 0 4px 0 var(--primary-700);
}
.speak-main:active { transform: translateY(4px); box-shadow: none; }
.speak-main.playing { animation: pulse-blue 1s infinite; }
@keyframes pulse-blue { 50% { box-shadow: 0 0 0 10px var(--primary-100); } }
.slow-btn { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2);
  border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.q-en { font-family: var(--serif); font-size: clamp(20px, 4.5vw, 25px); font-weight: 700; line-height: 1.5; color: var(--primary); }
.q-ar { font-size: 18px; color: var(--text-2); margin-top: 10px; font-weight: 600; }
.pron { display: inline-flex; gap: 6px; align-items: center; margin-top: 10px; font-size: 15px; color: var(--gold-700); background: var(--gold-50); padding: 6px 12px; border-radius: 12px; font-weight: 700; }
.answers { text-align: start; margin-top: 18px; display: grid; gap: 10px; }
.answers .label { font-size: 13px; font-weight: 800; color: var(--muted); }
.answer { display: flex; gap: 12px; align-items: center; background: var(--surface-2); border: 1px solid var(--border); border-radius: 16px; padding: 12px 14px; }
.answer .txt { flex: 1; min-width: 0; }
.answer .en { font-family: var(--serif); font-weight: 700; font-size: 17px; color: var(--primary); }
.answer .ar { color: var(--text-2); font-weight: 600; }
.answer .pr { color: var(--gold-700); font-size: 14px; font-weight: 700; }
.speak-sm { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; cursor: pointer; flex: none;
  background: var(--primary-50); color: var(--primary); border: none; }
.speak-sm:active { transform: scale(.94); }
.tip { display: flex; gap: 10px; align-items: flex-start; background: var(--violet-50); color: var(--violet); border-radius: 16px; padding: 12px 14px; margin-top: 14px; text-align: start; font-weight: 600; }
.tip .i { margin-top: 3px; }
.choices { display: grid; gap: 12px; margin-top: 18px; }
.choices .choice {
  font: inherit; text-align: start; cursor: pointer; padding: 16px 18px; border-radius: 18px; font-size: 17px; font-weight: 700;
  border: 2px solid var(--border); background: var(--surface); color: var(--text); box-shadow: 0 4px 0 var(--border);
  display: flex; align-items: center; gap: 12px; transition: transform .06s;
}
.choices .choice .key { width: 30px; height: 30px; border-radius: 9px; border: 2px solid var(--border); display: grid; place-items: center; font-size: 13px; color: var(--muted); flex: none; }
.choices .choice:hover:not(:disabled) { border-color: var(--primary-100); background: var(--primary-50); }
.choices .choice:active:not(:disabled) { transform: translateY(4px); box-shadow: none; }
.choices .choice.right { border-color: var(--green); background: var(--green-50); color: var(--green-700); box-shadow: 0 4px 0 var(--green); }
.choices .choice.wrong { border-color: var(--red); background: var(--red-50); color: var(--red-700); box-shadow: 0 4px 0 var(--red); }
.choices .choice:disabled { cursor: default; }
.answer-input { display: flex; gap: 10px; margin-top: 18px; }
.answer-input input { flex: 1; direction: ltr; text-align: left; font-size: 18px; font-weight: 600; min-height: 56px; }
.answer-input .btn { min-height: 56px; }
.pnav { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }
.pnav .btn.primary { flex: 1; max-width: 320px; margin-inline-start: auto; }
.sheet-space { height: 150px; }
.sheet {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 40; padding: 18px clamp(16px, 4vw, 32px) calc(18px + env(safe-area-inset-bottom));
  border-top: 2px solid; animation: up .22s ease-out;
}
@keyframes up { from { transform: translateY(100%); } }
.sheet .inner { max-width: 680px; margin: 0 auto; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.sheet .msg { flex: 1; min-width: 200px; display: flex; gap: 12px; align-items: center; }
.sheet .msg strong { font-size: 20px; font-weight: 900; display: block; }
.sheet .msg .chip-icon { background: #fff; }
.sheet.right { background: var(--green-50); border-color: var(--green); color: var(--green-700); }
.sheet.right .chip-icon { color: var(--green); }
.sheet.wrong { background: var(--red-50); border-color: var(--red); color: var(--red-700); }
.sheet.wrong .chip-icon { color: var(--red); }
.sheet .btn { min-width: 160px; }
@media (max-width: 820px) { .sheet { bottom: 0; } }
.finish { text-align: center; padding: clamp(24px, 6vw, 44px); }
.finish .trophy { width: 96px; height: 96px; border-radius: 28px; margin: 0 auto 14px; display: grid; place-items: center; background: var(--amber-50); color: var(--amber); }
.finish .trophy.sad { background: var(--primary-50); color: var(--primary); }
.finish .score { font-size: 56px; font-weight: 900; line-height: 1.1; margin: 8px 0; }
.try-review { padding: 14px 0; border-top: 1px solid var(--border); display: grid; gap: 10px; }
.try-review:first-of-type { border-top: 0; }
.try-cta { text-align: center; border: 2px solid var(--accent, #B31942); }
.try-band { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.letter-big { font-family: var(--serif); font-size: 88px; font-weight: 700; direction: ltr; line-height: 1.1; color: var(--primary); }
.letter-big::first-letter { color: var(--red); }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 10px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* ---------- chat ---------- */
.chat { display: flex; flex-direction: column; height: calc(100dvh - 150px); max-width: 780px; margin: 0 auto; }
@media (max-width: 820px) { .chat { height: calc(100dvh - 205px); } }
.chat-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.chat-head .avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--red); }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 4px; gap: 4px; }
.seg a { padding: 6px 12px; border-radius: 10px; font-weight: 700; font-size: 14px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.seg a:hover { text-decoration: none; }
.seg a.on { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }
.chat-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 16px 2px; }
.msg { max-width: 85%; padding: 12px 16px; border-radius: 20px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.75; }
.msg.bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-start-start-radius: 6px; box-shadow: var(--shadow-sm); }
.msg.me { align-self: flex-end; background: var(--primary); color: #fff; border-start-end-radius: 6px; }
.msg .listen { margin-top: 8px; display: inline-flex; gap: 6px; align-items: center; font: inherit; font-size: 13px; font-weight: 700; color: var(--primary); background: var(--primary-50); border: none; border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.typing-dots { display: inline-flex; gap: 4px; }
.typing-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing-dots i:nth-child(2) { animation-delay: .2s; } .typing-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: .25; } }
.chat-form { display: flex; gap: 8px; align-items: flex-end; padding-top: 10px; border-top: 1px solid var(--border); }
.chat-form textarea { min-height: 50px; max-height: 140px; flex: 1; border-radius: 16px; }
.suggestions { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; }
.suggestions button { flex: none; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); border-radius: 999px; padding: 6px 14px; }
.suggestions .chip-link { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 800; border: 1px solid var(--primary); background: var(--primary-50); color: var(--primary); border-radius: 999px; padding: 6px 12px; text-decoration: none; }

/* ---------- admin ---------- */
.admin-layout { display: grid; grid-template-columns: 250px 1fr; min-height: calc(100vh - 58px); }
.sidebar { background: var(--surface); border-inline-end: 1px solid var(--border); padding: 18px 12px; position: sticky; top: 58px; height: calc(100vh - 58px); overflow-y: auto; }
.sidebar .group { font-size: 12px; font-weight: 800; color: var(--muted); padding: 14px 12px 6px; }
.sidebar a { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-weight: 700; padding: 10px 12px; border-radius: 12px; margin-bottom: 2px; }
.sidebar a:hover { text-decoration: none; background: var(--surface-2); }
.sidebar a.active { background: var(--primary-50); color: var(--primary); }
.admin-main { padding: clamp(16px, 3vw, 28px); min-width: 0; }
@media (max-width: 900px) {
  .admin-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; display: flex; overflow-x: auto; gap: 4px; padding: 8px; border-inline-end: none; border-bottom: 1px solid var(--border); }
  .sidebar .group { display: none; }
  .sidebar a { white-space: nowrap; margin: 0; }
}
.stat { display: flex; gap: 14px; align-items: center; }
.stat .label { color: var(--muted); font-size: 13px; font-weight: 700; }
.stat .value { font-size: 26px; font-weight: 900; line-height: 1.25; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: 12px; color: var(--muted); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; font-weight: 700; }
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }
.inline-form { display: inline; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar input, .toolbar select { width: auto; min-width: 180px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs a { padding: 8px 14px; border-radius: 12px; font-weight: 700; font-size: 14px; color: var(--muted); background: var(--surface); border: 1px solid var(--border); }
.tabs a:hover { text-decoration: none; color: var(--text); }
.tabs a.on { background: var(--primary); color: #fff; border-color: var(--primary); }
audio { max-width: 100%; }

/* ---------- guidance: help, tour, today's plan, tips ---------- */
.help-btn { width: 42px; height: 42px; border-radius: 13px; color: var(--primary); }
.help-btn.on { background: var(--primary-50); border-color: var(--primary-100); }
.mobile-only { display: none; }
@media (max-width: 820px) { .mobile-only { display: inline-grid; } .desktop-only, .nav a.desktop-only { display: none; } }
.fab {
  position: fixed; z-index: 35; inset-inline-start: 18px; bottom: 22px;
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: #25d366; color: #fff; box-shadow: 0 10px 24px -8px rgba(18, 140, 70, .7);
}
.fab:hover { text-decoration: none; transform: scale(1.05); }
@media (max-width: 820px) { .fab { bottom: calc(84px + env(safe-area-inset-bottom)); width: 52px; height: 52px; } }
body.focus .fab { display: none; }

.plan { display: grid; gap: 10px; }
.plan-step {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; color: var(--text);
  background: var(--surface); border: 2px solid var(--border); box-shadow: 0 3px 0 var(--border);
}
.plan-step:hover { text-decoration: none; border-color: var(--primary-100); }
.plan-step .plan-num {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--surface-2); border: 2px solid var(--border); font-weight: 900; color: var(--muted);
}
.plan-step .plan-body { flex: 1; min-width: 0; }
.plan-step .plan-body strong { display: block; font-weight: 800; }
.plan-step .plan-body small { color: var(--muted); font-weight: 600; }
.plan-step.current { border-color: var(--primary); box-shadow: 0 3px 0 var(--primary-100); background: var(--primary-50); }
.plan-step.current .plan-num { background: var(--primary); border-color: var(--primary); color: #fff; }
.plan-step.done .plan-num { background: var(--green); border-color: var(--green); color: #fff; }
.plan-step.done .plan-body strong { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 2px; }
.plan-step .go { color: var(--muted); }

.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px;
  background: rgba(10, 15, 40, .55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.modal-card { width: 100%; max-width: 440px; background: var(--surface); border-radius: 28px; padding: 26px 22px 20px; box-shadow: var(--shadow-lg); text-align: center; animation: pop .25s ease-out; }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
.tour-art { width: 92px; height: 92px; border-radius: 28px; margin: 0 auto 16px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); }
.tour-art.green { background: var(--green-50); color: var(--green); }
.tour-art.violet { background: var(--violet-50); color: var(--violet); }
.tour-art.amber { background: var(--amber-50); color: var(--amber-700); }
.tour-slide h2 { font-size: 22px; margin-bottom: 8px; }
.tour-slide p { color: var(--text-2); font-size: 17px; }
.tour-dots { display: flex; justify-content: center; gap: 6px; margin-top: 16px; }
.tour-dots i { width: 8px; height: 8px; border-radius: 99px; background: var(--border); transition: width .2s; }
.tour-dots i.on { width: 24px; background: var(--primary); }
.legend { display: grid; gap: 12px; text-align: start; margin-top: 6px; }
.legend > div { display: flex; align-items: center; gap: 14px; font-weight: 700; }
.legend > div > :first-child { flex: none; }
.legend .speak-main, .legend .icon-btn { box-shadow: none; }
.legend.big > div { padding: 6px 0; border-bottom: 1px solid var(--border); }
.legend.big > div:last-child { border-bottom: none; }
.legend small { color: var(--muted); font-weight: 600; }

.coach { display: flex; gap: 12px; align-items: flex-start; background: var(--primary-50); color: var(--primary-700);
  border: 2px dashed var(--primary-100); border-radius: 18px; padding: 12px 14px; margin-bottom: 14px; font-weight: 700; }
.coach .i { margin-top: 3px; }
.coach .x { margin-inline-start: auto; background: none; border: none; color: inherit; cursor: pointer; padding: 2px; }
@media (prefers-color-scheme: dark) { .coach { color: var(--primary); } }

.toast { position: fixed; z-index: 90; inset-inline: 16px; bottom: 100px; margin: 0 auto; max-width: 420px;
  background: #0f172a; color: #fff; padding: 12px 16px; border-radius: 14px; font-weight: 700; text-align: center;
  box-shadow: var(--shadow-lg); animation: up .2s ease-out; }
.empty { text-align: center; padding: clamp(24px, 6vw, 40px); }
.empty .chip-icon { margin: 0 auto 12px; }
.icon-btn.loading { position: relative; color: transparent !important; pointer-events: none; }
.icon-btn.loading::after { content: ""; position: absolute; inset: 0; margin: auto; width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--primary); animation: spin .7s linear infinite; }
.btn.loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.loading::after { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .5); border-top-color: #fff; animation: spin .7s linear infinite; }
.btn:not(.primary):not(.success):not(.danger).loading::after { border-color: var(--border); border-top-color: var(--primary); }
@keyframes spin { to { transform: rotate(360deg); } }
.node .here { position: absolute; top: -34px; background: var(--red); color: #fff; font-size: 12px; font-weight: 800;
  padding: 3px 10px; border-radius: 10px; white-space: nowrap; animation: bob 1.4s ease-in-out infinite; }
.node .here::after { content: ""; position: absolute; bottom: -5px; inset-inline-start: 50%; margin-inline-start: -5px;
  border: 5px solid transparent; border-top-color: var(--red); border-bottom: 0; }
.node { position: relative; }
@keyframes bob { 50% { transform: translateY(-4px); } }
body.focus .topbar .mobile-only { display: none; }
.section-title { flex-wrap: wrap; }
.section-title h2 { white-space: nowrap; }
.choice-row { display: flex; gap: 10px; align-items: stretch; }
.choice-row .choice { flex: 1; min-width: 0; }


/* ---------- americana details ---------- */
.stars-divider { display: flex; justify-content: center; align-items: center; gap: 10px; color: var(--red); margin: 40px 0 18px; }
.stars-divider::before, .stars-divider::after { content: ""; height: 2px; width: 60px; background: var(--border); }
.stars-divider .i { width: 14px; height: 14px; fill: currentColor; }
.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: .5px; color: var(--red); display: inline-flex; align-items: center; gap: 6px; }
.section-head { text-align: center; margin-bottom: 22px; }
.section-head h2 { font-size: clamp(24px, 4vw, 30px); margin: 6px 0; }
.section-head p { color: var(--muted); }
.big-step { display: flex; gap: 16px; align-items: flex-start; }
.big-step .n { flex: none; margin: 0; }
.lead-q { font-family: var(--serif); }
.msg > div[dir=auto] { white-space: pre-wrap; }
.msg > .gap { height: 10px; }
.msg { white-space: normal; }

/* separate English / Arabic listen buttons */
.speak-main { flex-direction: column; gap: 0; }
.speak-main .lbl { font-size: 10px; font-weight: 800; letter-spacing: .3px; line-height: 1; margin-top: 2px; }
.speak-pair { display: inline-flex; gap: 6px; flex: none; }
.speak-en, .speak-ar {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  min-width: 46px; height: 46px; padding: 0 6px; border-radius: 12px; border: none; cursor: pointer; font: inherit;
}
.speak-en { background: var(--primary-50); color: var(--primary); }
.speak-ar { background: var(--red-50); color: var(--red); }
.speak-en .lbl, .speak-ar .lbl { font-size: 10px; font-weight: 800; line-height: 1; }
.speak-en.playing, .speak-ar.playing { outline: 3px solid currentColor; outline-offset: 1px; }
.speak-en:active, .speak-ar:active { transform: scale(.94); }
.speak-ar-pill { color: var(--red); border-color: var(--red-50); background: var(--red-50); }
.speak-ar-pill .lbl { font-size: 13px; }
.choice-row .speak-pair { flex-direction: column; }
.choice-row .speak-en, .choice-row .speak-ar { height: auto; flex: 1; min-height: 40px; }
.msg .listen.ar { color: var(--red); background: var(--red-50); }
.msg .listen + .listen { margin-inline-start: 6px; }
.listen-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.msg .listen.playing { outline: 2px solid currentColor; }

/* installable app */
.install-card { display: flex; align-items: center; gap: 12px; margin-top: 16px; border-inline-start: 5px solid var(--red); }
.install-card .grow { flex: 1; min-width: 0; }
.install-card h3 { margin: 0; }
html.standalone footer.site { padding-bottom: 120px; }

/* home: N-400 section on its own */
.n400-home { padding: 0; overflow: hidden; }
.n400-head { display: flex; align-items: center; gap: 14px; padding: 18px; color: #fff; background: var(--stars), var(--hero); border-bottom: 5px solid var(--red); }
.n400-head:hover { text-decoration: none; }
.n400-head h3 { color: #fff; margin: 0; }
.n400-head p { margin: 2px 0 0; opacity: .88; font-size: 14px; }
.n400-head .chip-icon { background: rgba(255, 255, 255, .16); color: #fff; }
.n400-head .go { margin-inline-start: auto; color: #fff; }
.n400-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); }
@media (max-width: 560px) { .n400-links { grid-template-columns: repeat(2, 1fr); } .n400-links a.later { order: 1; } }   /* phone: «Have you ever» and «إجاباتي» side by side */
.n400-links a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  padding: 16px 8px; background: var(--surface); color: var(--text); font-weight: 700; font-size: 14px; min-height: 92px; }
.n400-links a:hover { text-decoration: none; background: var(--surface-2); }
.n400-links a .i { color: var(--primary); width: 24px; height: 24px; }
.n400-links a.sim { color: var(--red); }
.n400-links a.sim .i { color: var(--red); }
.nowrap { white-space: nowrap; }

/* question level: 4 dots */
.badge.level { gap: 6px; background: var(--surface); }
.badge.level .dots { display: inline-flex; gap: 3px; }
.badge.level .dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.badge.level .dots i.on { background: var(--green); }
.badge.level.mastered { background: var(--green-50); color: var(--green); border-color: transparent; }
.level-note { font-weight: 800; margin-top: 2px; }
.levels-table { display: grid; gap: 8px; margin: 10px 0; }
.levels-table > div { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); text-align: start; }
.levels-table .badge.level { flex: none; }
.ring-help { display: inline-flex; align-items: center; gap: 4px; color: #fff; background: rgba(255,255,255,.16); border: none; border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }

/* challenge a friend */
.share-box { margin-top: 16px; gap: 10px; }
.share-url { direction: ltr; word-break: break-all; text-align: center; }
.board { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.board li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); font-weight: 700; }
.board li.me { border-color: var(--primary); background: var(--primary-50); }
.board .rank { width: 28px; text-align: center; font-size: 18px; }
.board .who { flex: 1; }
.board .pts { font-weight: 900; color: var(--primary); }
.duel-score { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 8px; }
.duel-score .score { font-size: 40px; }
.duel-score .vs { font-weight: 900; color: var(--red); font-size: 20px; }

/* daily reminder card */
.reminder-card { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 16px; position: relative; border-inline-start: 5px solid var(--amber, #d49b1f); }
.reminder-card .grow { flex: 1 1 200px; min-width: 0; }
.reminder-card h3 { margin: 0; }
.reminder-actions { gap: 8px; flex-wrap: wrap; }
.reminder-actions select.hour { width: auto; min-height: 40px; padding: 6px 12px; }
.time-pick { display: inline-flex; align-items: center; gap: 4px; }
.time-pick b { font-size: 18px; }
.reminder-x { width: 34px; height: 34px; position: absolute; top: 8px; inset-inline-end: 8px; }

/* N-400: my own answers */
.my-answers-top { display: flex; align-items: center; gap: 14px; margin: 14px 0; }
.my-answers-top .grow { flex: 1; font-weight: 700; }
.my-answers-top .bar { height: 8px; background: var(--surface-2); border-radius: 99px; margin-top: 6px; overflow: hidden; }
.my-answers-top .bar span { display: block; height: 100%; background: var(--green); width: 0; transition: width .3s; }
.my-answer { margin-bottom: 10px; }
.my-answer .head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.my-answer .q { font-weight: 800; font-size: 17px; }
.my-answer .explain { margin-top: 12px; display: grid; gap: 8px; }
.my-answer .explain label { margin: 0; font-size: 14px; }
.tip.warn { background: var(--amber-50); color: var(--amber-700); margin-top: 10px; }
.msg.bot.local { border-style: dashed; }
.how-it-works summary { cursor: pointer; font-weight: 800; list-style: none; display: flex; align-items: center; gap: 8px; }
.how-it-works summary::-webkit-details-marker { display: none; }
.how-it-works .why { margin: 12px 0 8px; }
.steps-mini { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.steps-mini li { display: flex; gap: 12px; align-items: flex-start; }
.steps-mini .n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: #fff; font-weight: 900; font-size: 14px; }
.done-card { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; border-inline-start: 5px solid var(--green); }
.done-card .grow { flex: 1; }
.done-card h3 { margin: 0; }
.my-filter { margin-bottom: 12px; }
@media (max-width: 520px) { .my-answers-top, .done-card { flex-wrap: wrap; } .my-answers-top .btn, .done-card .btn { width: 100%; justify-content: center; } .done-card .grow { flex: 1 1 60%; } }
.usual-box { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; border-inline-start: 5px solid var(--green); }
.usual-box h3 { margin: 0; font-size: 17px; }
.usual-split { display: grid; gap: 6px; margin-top: 10px; font-size: 14px; }
.usual-split > span { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 6px 10px; }
/* N-400 "Have you ever" lesson: pick the usual answer */
.usual-choice { margin-top: 12px; }
.usual-choice .ask { font-weight: 800; font-size: 18px; margin-bottom: 10px; text-align: center; }
.choices.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice.big { flex-direction: column; justify-content: center; align-items: center; gap: 2px; min-height: 78px; font-size: 22px; font-weight: 900; text-align: center; }
.choice.big .ar { font-size: 15px; font-weight: 700; color: var(--muted); }
.usual-result { margin-top: 12px; padding: 12px 14px; border-radius: 14px; font-size: 18px; text-align: center; }
.usual-result.right { background: var(--green-50); color: var(--green); }
.usual-result.wrong { background: var(--primary-50); color: var(--primary); }
.usual-result.depends { background: var(--amber-50); color: var(--amber-700); }
.usual-result .small { font-size: 14px; margin-top: 4px; font-weight: 600; }
.yesno-card { text-align: center; display: grid; gap: 10px; justify-items: center; }
.yesno-card .q-en { font-size: 24px; margin: 4px 0 0; }
.yesno-card .q-ar { margin: 0; }
.yesno-card .usual-choice, .yesno-card .usual-result, .yesno-card .tip { width: 100%; }
.yesno-card .usual-choice { margin-top: 4px; }
.full-text { font-size: 13px; color: var(--muted); }
.full-text summary { cursor: pointer; text-decoration: underline; }
.full-text .en { margin-top: 6px; font-size: 15px; color: var(--text); }
.n400-links a small { font-size: 12px; color: var(--muted); font-weight: 600; line-height: 1.4; }
.n400-links a.mine .i { color: var(--red); }
.n400-sim { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 16px; background: var(--red-50); color: var(--red); font-weight: 800; border-top: 1px solid var(--border); flex-wrap: wrap; }
.n400-sim:hover { text-decoration: none; background: var(--red-100, var(--red-50)); }
.n400-sim small { color: var(--red-700); font-weight: 600; opacity: .8; }
.from-lesson { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.from-lesson .grow { flex: 1 1 220px; }
.explain-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; color: var(--primary); font-weight: 700; }
/* bigger tap targets for people new to phones (at least ~40px) */
.coach .x { min-width: 40px; min-height: 40px; display: inline-grid; place-items: center; }
.msg .listen { min-height: 40px; padding: 8px 16px; font-size: 15px; }
.ring-help { min-height: 38px; padding: 6px 14px; }
.delete-account summary { cursor: pointer; color: var(--red); font-weight: 700; }
.delete-account form { margin-top: 12px; }

/* tapped a link: instant feedback while the next page loads */
html.navigating::before { content: ""; position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: 9999;
  background: linear-gradient(90deg, transparent, var(--primary), transparent); background-size: 40% 100%; background-repeat: no-repeat;
  animation: nav-bar 1s linear infinite; }
@keyframes nav-bar { from { background-position: -40% 0; } to { background-position: 140% 0; } }
.tapped { opacity: .6; transition: opacity .1s; }
a, button { -webkit-tap-highlight-color: rgba(0, 0, 0, .06); touch-action: manipulation; }

/* the 6-digit email code */
.code-input { direction: ltr; text-align: center; font-size: 30px; font-weight: 800; letter-spacing: 10px; padding: 12px 8px; font-variant-numeric: tabular-nums; }
.code-input::placeholder { color: var(--border); letter-spacing: 10px; }

/* my answers: filled in from the learner's state */
.auto-answer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; font-size: 17px; }

/* the listening strip: by the answer box, shows the learner when to talk, that they're heard, and when it's done */
.mic-panel { margin: 10px 0; background: var(--surface); border: 2px solid var(--red); border-radius: 18px; padding: 10px 12px; }
.mic-row { display: flex; align-items: center; gap: 10px; }
.mic-ring { --level: 0; flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--red); color: #fff; transition: box-shadow .08s linear;
  box-shadow: 0 0 0 calc(3px + var(--level) * 10px) color-mix(in srgb, var(--red) 22%, transparent); }
.mic-ring .i { width: 22px; height: 22px; }
.mic-panel[data-state="listening"] .mic-ring, .mic-panel[data-state="quiet"] .mic-ring { animation: mic-breathe 1.4s ease-in-out infinite; }
@keyframes mic-breathe { 50% { transform: scale(1.08); } }
.mic-panel[data-state="hearing"] { border-color: var(--green); }
.mic-panel[data-state="hearing"] .mic-ring { background: var(--green); box-shadow: 0 0 0 calc(3px + var(--level) * 10px) color-mix(in srgb, var(--green) 22%, transparent); }
.mic-panel[data-state="thinking"] { border-color: var(--primary); }
.mic-panel[data-state="thinking"] .mic-ring { background: var(--primary); animation: none; }
.mic-panel[data-state="thinking"] .mic-ring .i { animation: spin 1.2s linear infinite; }
.mic-text { flex: 1; min-width: 0; }
.mic-title { font-size: 17px; font-weight: 900; color: var(--text); line-height: 1.3; }
.mic-sub { font-size: 13px; color: var(--muted); line-height: 1.4; }
.mic-panel[data-state="quiet"] .mic-title { color: var(--amber-700, #9a6700); }
.mic-bars { flex: none; display: flex; align-items: center; gap: 3px; height: 30px; }
.mic-bars i { width: 4px; height: 12%; border-radius: 4px; background: var(--border); transition: height .1s ease; }
.mic-panel[data-state="hearing"] .mic-bars i { background: var(--green); }
.mic-hint { font-size: 13px; color: var(--text-2); background: var(--surface-2); border-radius: 10px; padding: 6px 10px; margin-top: 8px; }

/* reading & writing help: the sentence as tappable words, colored after an answer */
.wchips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 10px 0 4px; }
.wchip { font-size: 24px; font-weight: 700; padding: 4px 10px; border-radius: 12px; border: 2px solid var(--border); background: var(--surface);
  color: var(--primary); box-shadow: 0 2px 0 var(--border); cursor: pointer; }
.wchip.plain { border-style: dashed; }
.wchip.on { border-color: var(--primary); background: var(--primary-50); }
.wchip.right { border-color: var(--green); background: var(--green-50, #e8f5ee); color: var(--green-700, #0f5c3a); }
.wchip.close { border-color: #d98a00; background: #fff4dd; color: #8a5600; }
.wchip.missing { border-color: var(--red); background: var(--red-50); color: var(--red-700); text-decoration: line-through; }
.word-info { margin: 8px auto 0; max-width: 360px; text-align: center; background: var(--surface-2); border-radius: 14px; padding: 10px 12px; font-size: 18px; }
.word-info .pr { color: var(--muted); font-size: 15px; margin-top: 4px; }
.blanks { font-size: 26px; line-height: 1.7; text-align: center; }
.blanks .blank { color: var(--red); letter-spacing: 2px; font-weight: 800; }
.level-btn { justify-content: space-between; text-align: start; }
.level-btn strong { display: block; }
.level-btn small { display: block; font-weight: 500; }
.mic-panel[data-state="starting"] { border-color: var(--border); }
.mic-panel[data-state="starting"] .mic-ring { background: var(--muted); animation: none; box-shadow: none; }
