/* ==================================================================
         STYLES — design tokens first, then components in screen order.
         Light theme is the default; [data-theme="dark"] overrides tokens.
         ================================================================== */
      :root {
        --bg: #f2f7fd;
        --surface: #ffffff;
        --surface2: #eaf2ff;
        --ink: #24385f;
        --head: #14264a;
        --muted: #71819b;
        --muted2: #8a99ae;
        --line: #dfe8f5;
        --navy: #0b2b5b;
        --navy2: #2878f9;
        --blue: #2878f9;
        --sel: #2878f9;
        --blue-soft: #eaf2ff;
        --green: #12a879;
        --green-bg: #ddf8eb;
        --red: #ef4655;
        --red-bg: #fff0f0;
        --purple: #7457f6;
        --orange: #f59e0b;
        --yellow: #f6ca4d;
        --amber: #f59e0b;
        --amber-tx: #9a7405;
        --amber-bg: #fff3d6;
        --r: 16px;
        --r-sm: 12px;
        --shadow:
          0 1px 2px rgba(16, 28, 74, 0.05), 0 8px 22px rgba(16, 28, 74, 0.06);
        --header-h: 58px;
        --bottom-h: 62px;
        color-scheme: light;
      }
      [data-theme="dark"] {
        --bg: #061426;
        --surface: #132941;
        --surface2: #1e3a5c;
        --ink: #f5f7fc;
        --head: #f5f7fc;
        --muted: #bccfe8;
        --line: #3a5a87;
        --navy: #7aa6ea;
        --navy2: #a8c4f2;
        --blue: #4a90ff;
        --sel: #4a90ff;
        --blue-soft: #17345c;
        --green: #12b981;
        --green-bg: rgba(18, 185, 129, 0.22);
        --red: #f26d6a;
        --red-bg: rgba(239, 83, 80, 0.2);
        --amber: #f5c451;
        --amber-tx: #f5c451;
        --amber-bg: rgba(245, 196, 81, 0.14);
        --shadow:
          0 1px 2px rgba(0, 0, 0, 0.25), 0 10px 28px rgba(0, 0, 0, 0.28);
        color-scheme: dark;
      }
      /* dark legibility: readable placeholders, unmistakable answer states */
      [data-theme="dark"] ::placeholder {
        color: #8fa8cc;
        opacity: 1;
      }
      [data-theme="dark"] .opt.correct,
      [data-theme="dark"] .opt.wrong,
      [data-theme="dark"] .study-opt.correct {
        border-width: 2px;
      }
      * {
        box-sizing: border-box;
      }
      html {
        scroll-behavior: smooth;
      }
      @media (prefers-reduced-motion: reduce) {
        * {
          transition: none !important;
          animation: none !important;
          scroll-behavior: auto !important;
        }
      }
      body {
        margin: 0;
        font-family:
          "Inter",
          ui-sans-system,
          -apple-system,
          "Segoe UI",
          Roboto,
          Helvetica,
          Arial,
          sans-serif;
        background: var(--bg);
        color: var(--ink);
        font-size: 16px;
        line-height: 1.55;
        -webkit-font-smoothing: antialiased;
      }
      h1,
      h2,
      h3 {
        line-height: 1.2;
        margin: 0;
        letter-spacing: -0.01em;
        color: var(--head);
      }
      p {
        margin: 0;
      }
      button {
        font: inherit;
        cursor: pointer;
      }
      input,
      select,
      textarea {
        font: inherit;
        color: var(--ink);
      }
      :focus-visible {
        outline: 3px solid var(--blue);
        outline-offset: 2px;
        border-radius: 6px;
      }
      a {
        color: var(--blue);
      }
      .wrap {
        max-width: 1024px;
        margin: 0 auto;
        padding: 0 16px;
      }
      @media (min-width: 768px) {
        .wrap {
          padding: 0 24px;
        }
      }
      .narrow {
        max-width: 560px;
        margin: 0 auto;
      }
      /* header */
      header.top {
        position: sticky;
        top: 0;
        z-index: 40;
        background: var(--bg);
        border-bottom: 1px solid var(--line);
      }
      .top-in {
        display: flex;
        align-items: center;
        gap: 10px;
        height: var(--header-h);
        max-width: 1120px;
        margin: 0 auto;
        padding: 0 16px;
        position: relative;
      }
      .brand {
        font-weight: 800;
        font-size: 17px;
        color: var(--ink);
        text-decoration: none;
        white-space: nowrap;
        display: flex;
        align-items: center;
        gap: 8px;
      }
      .brand svg {
        flex-shrink: 0;
      }
      .brand span {
        color: var(--blue);
      }
      .top nav {
        display: none;
        gap: 4px;
        margin-left: 8px;
      }
      @media (min-width: 900px) {
        .top nav {
          display: flex;
        }
      }
      .top nav button,
      .top nav a {
        background: none;
        border: 0;
        padding: 8px 10px;
        border-radius: 10px;
        color: var(--ink);
        text-decoration: none;
        font-weight: 600;
        font-size: 14px;
      }
      .top nav button:hover,
      .top nav a:hover {
        background: var(--surface2);
      }
      @media (max-width: 899px) {
        .top nav.open {
          display: flex;
          position: absolute;
          top: calc(var(--header-h) + 6px);
          right: 10px;
          flex-direction: column;
          background: var(--surface);
          border: 1px solid var(--line);
          border-radius: 14px;
          padding: 8px;
          box-shadow: var(--shadow);
          z-index: 55;
          min-width: 180px;
        }
      }
      /* header nav: desktop shows the main destinations; the mobile
         hamburger menu shows secondary items only (bottom nav owns the rest) */
      .top nav .nav-desk {
        display: contents;
      }
      .top nav .nav-sec {
        display: none;
      }
      @media (max-width: 899px) {
        .top nav .nav-desk {
          display: none;
        }
        .top nav .nav-sec {
          display: contents;
        }
      }
      .menu-id {
        display: flex;
        flex-direction: column;
        padding: 8px 10px 10px;
        border-bottom: 1px solid var(--line);
        margin-bottom: 4px;
        min-width: 200px;
      }
      .menu-id b {
        font-size: 15px;
        color: var(--head);
        line-height: 1.3;
      }
      .menu-id span {
        font-size: 12.5px;
        color: var(--muted);
        line-height: 1.35;
      }
      .top .sp {
        flex: 1;
      }
      .icon-btn {
        border: 1px solid var(--line);
        background: var(--surface);
        color: var(--ink);
        border-radius: 999px;
        padding: 8px 13px;
        font-weight: 700;
        font-size: 14px;
        min-height: 40px;
      }
      .ham-btn {
        display: none;
        border: 1px solid var(--line);
        background: var(--surface);
        color: var(--ink);
        border-radius: 10px;
        width: 40px;
        height: 40px;
        font-size: 17px;
        align-items: center;
        justify-content: center;
      }
      @media (max-width: 899px) {
        .ham-btn {
          display: flex;
        }
      }
      .avatar-btn {
        width: 38px;
        height: 38px;
        border-radius: 50%;
        border: 0;
        background: var(--blue);
        color: #fff;
        font-weight: 800;
        font-size: 15px;
        display: none;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
      }
      main {
        padding-bottom: calc(var(--bottom-h) + 32px);
      }
      @media (min-width: 900px) {
        main {
          padding-bottom: 48px;
        }
      }
      /* hero / welcome */
      .hero {
        padding: 28px 0 8px;
      }
      .hero h1 {
        font-size: 32px;
        font-weight: 800;
        max-width: 560px;
      }
      @media (min-width: 768px) {
        .hero h1 {
          font-size: 40px;
        }
      }
      .hero .sub {
        color: var(--muted);
        font-size: 17px;
        margin-top: 10px;
        max-width: 560px;
      }
      .badge {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        background: var(--green-bg);
        color: var(--green);
        font-weight: 700;
        font-size: 13px;
        padding: 5px 12px;
        border-radius: 999px;
        margin-bottom: 14px;
      }
      .cta-row {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 20px;
      }
      .btn {
        border: 0;
        border-radius: 12px;
        padding: 13px 20px;
        font-weight: 700;
        font-size: 15px;
        min-height: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        text-decoration: none;
        transition:
          transform 0.12s,
          background 0.12s;
      }
      .btn:active {
        transform: scale(0.98);
      }
      .btn-p {
        background: var(--blue);
        color: #fff;
      }
      .btn-p:hover {
        opacity: 0.92;
      }
      .btn-s {
        background: var(--surface);
        color: var(--ink);
        border: 1.5px solid var(--line);
      }
      .btn-s:hover {
        border-color: var(--blue);
        color: var(--blue);
      }
      .btn-g {
        background: var(--surface2);
        color: var(--ink);
      }
      .btn-sm {
        padding: 9px 14px;
        min-height: 42px;
        font-size: 14px;
        border-radius: 10px;
      }
      .btn:disabled {
        opacity: 0.45;
        cursor: not-allowed;
      }
      .feat {
        list-style: none;
        margin: 20px 0 4px;
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 11px;
      }
      .feat li {
        display: flex;
        align-items: center;
        gap: 10px;
        font-weight: 600;
        font-size: 15px;
      }
      .feat .ck {
        width: 22px;
        height: 22px;
        border-radius: 50%;
        background: var(--green);
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 13px;
        font-weight: 800;
        flex-shrink: 0;
      }
      .illus {
        margin: 22px 0 4px;
        max-width: 340px;
      }
      /* auth */
      .back-btn {
        background: none;
        border: 0;
        color: var(--ink);
        font-size: 20px;
        padding: 6px 6px 6px 0;
        min-height: 40px;
      }
      .field {
        position: relative;
        margin-top: 14px;
      }
      .field .fic {
        position: absolute;
        left: 13px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--muted);
        display: flex;
        pointer-events: none;
      }
      .field input {
        width: 100%;
        border: 1.5px solid var(--line);
        background: var(--surface);
        border-radius: 12px;
        padding: 13px 44px 13px 42px;
        font-size: 15.5px;
        min-height: 52px;
      }
      .field input:focus {
        outline: none;
        border-color: var(--blue);
      }
      .field .eye {
        position: absolute;
        right: 6px;
        top: 50%;
        transform: translateY(-50%);
        background: none;
        border: 0;
        color: var(--muted);
        width: 38px;
        height: 38px;
        font-size: 16px;
      }
      .auth-card {
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: var(--r);
        padding: 20px 18px;
        box-shadow: var(--shadow);
        max-width: 440px;
        margin-top: 16px;
      }
      .auth-card label.f {
        margin-top: 0;
      }
      .auth-card .field:first-of-type {
        margin-top: 6px;
      }
      .rem-row {
        display: flex;
        align-items: center;
        gap: 9px;
        margin-top: 14px;
        min-height: 24px;
        font-size: 14.5px;
        color: var(--ink);
        cursor: pointer;
        user-select: none;
        -webkit-user-select: none;
      }
      .rem-row input {
        width: 18px;
        height: 18px;
        flex: none;
        margin: 0;
        padding: 0;
        accent-color: var(--blue);
        cursor: pointer;
      }
      /* search */
      .searchbox {
        display: flex;
        gap: 8px;
        margin-top: 16px;
        background: var(--surface);
        border: 1.5px solid var(--line);
        border-radius: 14px;
        padding: 6px;
        box-shadow: var(--shadow);
      }
      .searchbox input {
        flex: 1;
        border: 0;
        background: transparent;
        padding: 10px;
        font-size: 16px;
        min-width: 0;
        color: var(--ink);
      }
      .searchbox input:focus {
        outline: none;
      }
      .searchbox:focus-within {
        border-color: var(--blue);
      }
      .searchbox button {
        flex-shrink: 0;
      }
      .clear-btn {
        background: none;
        border: 0;
        color: var(--muted);
        font-size: 16px;
        width: 40px;
        min-height: 40px;
      }
      /* cards & grids */
      .card {
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: var(--r);
        padding: 18px;
        box-shadow: var(--shadow);
      }
      .sec {
        margin-top: 32px;
      }
      .sec h2 {
        font-size: 20px;
        font-weight: 800;
      }
      .sec .hint {
        color: var(--muted);
        font-size: 14px;
        margin-top: 4px;
      }
      .week-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-top: 16px;
      }
      @media (min-width: 640px) {
        .week-grid {
          grid-template-columns: repeat(3, minmax(0, 1fr));
          gap: 14px;
        }
      }
      @media (min-width: 960px) {
        .week-grid {
          grid-template-columns: repeat(4, minmax(0, 1fr));
        }
      }
      .week-card {
        min-width: 0;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: var(--r);
        padding: 14px;
        box-shadow: var(--shadow);
        display: flex;
        flex-direction: column;
        gap: 6px;
      }
      .week-card h3 {
        font-size: 16px;
      }
      .week-card .cnt {
        color: var(--muted);
        font-size: 13px;
      }
      .week-card .prog {
        height: 7px;
        background: var(--surface2);
        border-radius: 99px;
        overflow: hidden;
      }
      .week-card .prog i {
        display: block;
        height: 100%;
        background: var(--blue);
        border-radius: 99px;
      }
      .week-card .meta {
        font-size: 12.5px;
        color: var(--muted);
      }
      .mode-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        margin-top: 16px;
      }
      .mode-card {
        min-width: 0;
        text-align: left;
        width: 100%;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: var(--r);
        padding: 14px;
        box-shadow: var(--shadow);
        color: var(--ink);
        display: flex;
        align-items: flex-start;
        gap: 11px;
        height: 100%;
      }
      .mode-card .mtxt {
        flex: 1;
        min-width: 0;
      }
      .mode-card h3 {
        font-size: 15.5px;
        margin: 1px 0 3px;
        line-height: 1.25;
      }
      .mode-card p {
        color: var(--muted);
        font-size: 13px;
        line-height: 1.35;
      }
      .mode-card .chev {
        flex-shrink: 0;
        align-self: center;
        width: 8px;
        height: 8px;
        border-right: 2.5px solid var(--muted);
        border-top: 2.5px solid var(--muted);
        transform: rotate(45deg);
        opacity: 0.65;
      }
      /* home hero row: greeting text + compact illustration */
      .home-hero {
        display: flex;
        gap: 10px;
        align-items: flex-start;
        margin-top: 18px;
      }
      .home-hero .hh-txt {
        flex: 1;
        min-width: 0;
      }
      .home-hero .hh-art {
        flex-shrink: 0;
        width: 128px;
        max-width: 34vw;
      }
      .home-hero .hh-art svg {
        display: block;
        width: 100%;
        height: auto;
      }
      @media (max-width: 380px) {
        .home-hero .hh-art {
          width: 104px;
        }
        .mode-card {
          padding: 12px;
        }
        .mode-card h3 {
          font-size: 15px;
        }
      }
      /* continue card progress track */
      .cont-track {
        height: 8px;
        background: var(--surface2);
        border-radius: 99px;
        overflow: hidden;
        flex: 1;
      }
      .cont-track i {
        display: block;
        height: 100%;
        background: var(--blue);
        border-radius: 99px;
      }
      /* learn-from-zero card: pale green, matches reference */
      .learn-card {
        background: #e9f9f0;
        border-color: #bfe9d4;
      }
      [data-theme="dark"] .learn-card {
        background: rgba(18, 185, 129, 0.1);
        border-color: #1f5c46;
      }
      .btn-green {
        background: var(--green);
        color: #fff;
      }
      .btn-green:hover {
        filter: brightness(1.06);
      }
      .tile {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        flex-shrink: 0;
      }
      .tile svg {
        width: 24px;
        height: 24px;
      }
      /* week list rows */
      .week-list {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 16px;
        max-width: 640px;
      }
      .week-row {
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: var(--r);
        padding: 14px;
        box-shadow: var(--shadow);
      }
      .week-row .top {
        display: flex;
        align-items: center;
        gap: 12px;
      }
      .wtile {
        width: 46px;
        height: 46px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 800;
        font-size: 18px;
        color: #fff;
        flex-shrink: 0;
      }
      .week-row .info {
        flex: 1;
        min-width: 0;
      }
      .week-row .info b {
        font-size: 16px;
      }
      .week-row .info .cnt {
        color: var(--muted);
        font-size: 13px;
      }
      .week-row .frac {
        color: var(--muted);
        font-size: 13px;
        font-weight: 700;
        white-space: nowrap;
      }
      .week-row .chev {
        color: var(--muted);
        font-size: 18px;
      }
      .week-row .prog {
        height: 6px;
        background: var(--surface2);
        border-radius: 99px;
        overflow: hidden;
        margin-top: 10px;
      }
      .week-row .prog i {
        display: block;
        height: 100%;
        border-radius: 99px;
      }
      .week-row .acts {
        display: flex;
        gap: 8px;
        margin-top: 12px;
      }
      .week-row .acts .btn {
        flex: 1;
      }
      /* views */
      .view {
        display: none;
      }
      .view.on {
        display: block;
      }
      .crumb {
        font-size: 13.5px;
        color: var(--muted);
        margin: 18px 0 8px;
      }
      .crumb b {
        color: var(--ink);
      }
      /* practice */
      .p-head {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
        margin-top: 6px;
      }
      .pill {
        font-size: 12.5px;
        font-weight: 700;
        padding: 4px 10px;
        border-radius: 999px;
        background: var(--blue-soft);
        color: var(--navy2);
      }
      .progress {
        height: 8px;
        background: var(--surface2);
        border-radius: 99px;
        overflow: hidden;
        margin: 12px 0 16px;
      }
      .progress i {
        display: block;
        height: 100%;
        background: var(--blue);
        transition: width 0.25s;
      }
      .q-card {
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: var(--r);
        padding: 20px 16px;
        box-shadow: var(--shadow);
      }
      @media (min-width: 768px) {
        .q-card {
          padding: 28px;
        }
      }
      .q-text {
        font-size: 18px;
        font-weight: 650;
        line-height: 1.5;
      }
      @media (min-width: 768px) {
        .q-text {
          font-size: 20px;
        }
      }
      .opts {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 18px;
      }
      .opt {
        display: flex;
        gap: 12px;
        align-items: center;
        text-align: left;
        width: 100%;
        background: var(--surface);
        border: 1.5px solid var(--line);
        border-radius: 14px;
        padding: 14px;
        min-height: 54px;
        font-size: 16px;
        color: var(--ink);
        transition:
          border-color 0.12s,
          background 0.12s;
      }
      .opt .ltr {
        flex-shrink: 0;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: var(--surface2);
        border: 1.5px solid var(--line);
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 800;
        font-size: 14px;
      }
      .opt:hover {
        border-color: var(--sel);
      }
      .opt.sel {
        border-color: var(--sel);
        background: var(--blue-soft);
      }
      .opt.sel .ltr {
        background: var(--sel);
        border-color: var(--sel);
        color: #fff;
      }
      .opt.correct {
        border-color: var(--green);
        background: var(--green-bg);
      }
      .opt.correct .ltr {
        background: var(--green);
        border-color: var(--green);
        color: #fff;
      }
      .opt.wrong {
        border-color: var(--red);
        background: var(--red-bg);
      }
      .opt.wrong .ltr {
        background: var(--red);
        border-color: var(--red);
        color: #fff;
      }
      .opt:disabled {
        cursor: default;
      }
      /* Study Questions (Learn) — read-only options, correct one in green */
      .study-opts {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 12px;
      }
      .study-opt {
        display: flex;
        gap: 12px;
        align-items: center;
        width: 100%;
        background: var(--surface);
        border: 1.5px solid var(--line);
        border-radius: 14px;
        padding: 13px 14px;
        font-size: 15.5px;
        color: var(--ink);
      }
      .study-opt .ltr {
        flex-shrink: 0;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: var(--surface2);
        border: 1.5px solid var(--line);
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 800;
        font-size: 14px;
      }
      .study-opt .stmain {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 7px;
      }
      .study-opt .stxt {
        min-width: 0;
        overflow-wrap: anywhere;
      }
      .study-opt.correct {
        border-color: var(--green);
        background: var(--green-bg);
      }
      .study-opt.correct .ltr {
        background: var(--green);
        border-color: var(--green);
        color: #fff;
      }
      .ok-tag {
        flex-shrink: 0;
        background: var(--green);
        color: #fff;
        font-size: 11.5px;
        font-weight: 700;
        letter-spacing: 0.02em;
        padding: 4px 10px;
        border-radius: 999px;
        white-space: nowrap;
      }
      /* Option text must never be clipped or overflow its box on any
         surface (session + flashcard rows, results review, revision
         answer blocks, accepted-answer box): allow words to break
         rather than run under a marker or off the card. */
      .opt > span:not(.ltr) {
        min-width: 0;
        overflow-wrap: anywhere;
      }
      .review-opt,
      .ans-block p,
      .acc-box {
        overflow-wrap: anywhere;
      }
      .wkchips {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 14px;
      }
      .wkchip {
        border: 1.5px solid var(--line);
        background: var(--surface);
        color: var(--ink);
        border-radius: 999px;
        padding: 6px 12px;
        font-size: 13.5px;
        font-weight: 700;
        cursor: pointer;
      }
      .wkchip.on {
        background: var(--blue);
        border-color: var(--blue);
        color: #fff;
      }
      /* Performance graph (Home) — hand-rolled week accuracy bars */
      .pg-row {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-top: 10px;
      }
      .pg-w {
        width: 36px;
        flex-shrink: 0;
        font-weight: 700;
        font-size: 13.5px;
        color: var(--head);
      }
      .pg-track {
        flex: 1;
        height: 12px;
        border-radius: 999px;
        background: var(--surface2);
        overflow: hidden;
      }
      .pg-track i {
        display: block;
        height: 100%;
        border-radius: 999px;
        background: var(--blue);
      }
      .pg-row.weak .pg-track i {
        background: var(--red);
      }
      .pg-pct {
        width: 44px;
        flex-shrink: 0;
        text-align: right;
        font-weight: 700;
        font-size: 13.5px;
      }
      .fb-btns {
        display: flex;
        gap: 10px;
        margin-top: 12px;
      }
      .fb-btn {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 12px;
        border-radius: 14px;
        border: 1.5px solid var(--line);
        background: var(--surface);
        color: var(--ink);
        font-size: 15px;
        font-weight: 700;
        cursor: pointer;
      }
      .fb-btn.on-up {
        border-color: var(--green);
        background: var(--green-bg);
        color: var(--green);
      }
      .fb-btn.on-down {
        border-color: var(--red);
        background: var(--red-bg);
        color: var(--red);
      }
      .bmp {
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
      }
      .bmp[data-on="1"] {
        fill: var(--amber);
        stroke: var(--amber);
      }
      .bm-btn {
        background: none;
        border: 0;
        color: var(--muted);
        width: 42px;
        height: 42px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
      }
      .feedback {
        margin-top: 16px;
        border-radius: 14px;
        padding: 14px 16px;
        font-size: 16px;
        font-weight: 700;
      }
      .feedback.ok {
        background: var(--green);
        color: #fff;
      }
      .feedback.bad {
        background: var(--red);
        color: #fff;
      }
      .feedback .sub {
        font-weight: 600;
        font-size: 13.5px;
        opacity: 0.92;
      }
      [data-theme="light"] .feedback.ok {
        background: var(--green-bg);
        color: var(--green);
      }
      [data-theme="light"] .feedback.bad {
        background: var(--red-bg);
        color: var(--red);
      }
      .acc-box {
        margin-top: 12px;
        border: 1.5px solid var(--green);
        background: var(--green-bg);
        border-radius: 14px;
        padding: 13px 16px;
        font-size: 15px;
      }
      .acc-box .noexp {
        color: var(--muted);
        font-size: 13.5px;
        margin-top: 3px;
        font-weight: 600;
      }
      .q-tools {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 14px;
      }
      .tool-btn {
        border: 1px solid var(--line);
        background: var(--surface);
        border-radius: 999px;
        padding: 8px 14px;
        font-weight: 600;
        font-size: 13.5px;
        min-height: 40px;
        color: var(--ink);
      }
      .tool-btn.active {
        background: var(--amber-bg);
        border-color: var(--amber-tx);
        color: var(--amber-tx);
      }
      /* sticky practice bar (mobile) */
      .p-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: var(--bottom-h);
        z-index: 35;
        background: var(--surface);
        border-top: 1px solid var(--line);
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
        display: none;
        gap: 8px;
      }
      .p-bar.on {
        display: flex;
      }
      .p-bar .btn {
        flex: 1;
      }
      @media (min-width: 900px) {
        .p-bar {
          bottom: 0;
        }
        .p-bar .btn {
          flex: 0 1 auto;
        }
      }
      .desktop-nav-row {
        display: none;
        gap: 8px;
        margin-top: 16px;
      }
      @media (min-width: 900px) {
        .desktop-nav-row {
          display: flex;
        }
      }
      /* timer / palette */
      .mock-top {
        position: sticky;
        top: var(--header-h);
        z-index: 30;
        background: var(--bg);
        padding: 10px 0;
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
      }
      .timer {
        font-variant-numeric: tabular-nums;
        font-weight: 800;
        font-size: 16px;
        background: var(--red-bg);
        color: var(--red);
        border: 1.5px solid var(--red);
        border-radius: 999px;
        padding: 7px 14px;
      }
      .timer.low {
        animation: pulse 1s infinite;
      }
      @keyframes pulse {
        50% {
          opacity: 0.55;
        }
      }
      .palette {
        display: grid;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 8px;
        margin-top: 10px;
      }
      @media (min-width: 640px) {
        .palette {
          grid-template-columns: repeat(10, minmax(0, 1fr));
        }
      }
      .pal-btn {
        height: 44px;
        border-radius: 10px;
        border: 1.5px solid var(--line);
        background: var(--surface2);
        font-weight: 700;
        color: var(--ink);
      }
      .pal-btn.ans {
        background: var(--green);
        border-color: var(--green);
        color: #fff;
      }
      .pal-btn.mark {
        background: var(--red);
        border-color: var(--red);
        color: #fff;
      }
      .pal-btn.cur {
        border-color: var(--sel);
        box-shadow: inset 0 0 0 2px var(--sel);
      }
      /* session screen: slim sticky header */
      .ses-head {
        position: sticky;
        top: var(--header-h);
        z-index: 30;
        background: var(--bg);
        padding: 10px 0 8px;
        margin-bottom: 12px;
      }
      .ses-row {
        display: flex;
        align-items: center;
        gap: 8px;
      }
      .ses-row .pill {
        white-space: nowrap;
        flex-shrink: 0;
      }
      .ses-title {
        font-weight: 800;
        font-size: 15px;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .ses-meta {
        font-size: 13px;
        color: var(--muted);
        font-weight: 600;
      }
      .ses-head .timer {
        font-size: 14px;
        padding: 4px 11px;
      }
      .ses-head .progress {
        height: 5px;
        margin: 8px 0 0;
        background: var(--surface2);
      }
      .qchip {
        border: 1.5px solid var(--line);
        background: var(--surface);
        color: var(--ink);
        border-radius: 999px;
        padding: 6px 12px;
        font-weight: 700;
        font-size: 13px;
        min-height: 34px;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        flex-shrink: 0;
      }
      /* question palette: overlay bottom sheet (never in page flow) */
      .pal-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(8, 12, 24, 0.52);
        z-index: 65;
        display: none;
      }
      .pal-backdrop.open {
        display: block;
      }
      .pal-sheet {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 66;
        background: var(--surface);
        border-top: 1px solid var(--line);
        border-radius: 18px 18px 0 0;
        box-shadow: var(--shadow-lg);
        max-height: 60vh;
        display: none;
        flex-direction: column;
        padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
      }
      .pal-sheet.open {
        display: flex;
      }
      @media (min-width: 900px) {
        .pal-sheet {
          left: 50%;
          right: auto;
          transform: translateX(-50%);
          width: min(680px, 100%);
        }
      }
      .pal-sheet-head {
        display: flex;
        align-items: center;
        gap: 8px;
      }
      .pal-sheet .palette {
        overflow-y: auto;
        margin-top: 12px;
        padding: 2px;
      }
      .pal-legend {
        display: flex;
        gap: 6px;
        flex-wrap: wrap;
        margin-top: 10px;
      }
      .pal-legend .lg {
        font-size: 12px;
        font-weight: 700;
        padding: 3px 9px;
        border-radius: 999px;
        border: 1.5px solid var(--line);
        background: var(--surface2);
        color: var(--ink);
        display: inline-flex;
        align-items: center;
        gap: 6px;
      }
      .pal-legend .dot {
        width: 10px;
        height: 10px;
        border-radius: 3px;
        display: inline-block;
        flex-shrink: 0;
      }
      /* session question card: one compact tool row */
      .q-tools .tool-btn {
        min-height: 36px;
        padding: 6px 12px;
        font-size: 13px;
        display: inline-flex;
        align-items: center;
        gap: 6px;
      }
      .q-tools .tool-ic {
        width: 38px;
        height: 38px;
        min-height: 38px;
        padding: 0;
        justify-content: center;
      }
      .q-tools .bm-btn {
        width: 38px;
        height: 38px;
        border: 1px solid var(--line);
        border-radius: 999px;
        background: var(--surface);
      }
      /* learn: week-to-week navigation row */
      .learn-week-nav {
        display: flex;
        gap: 8px;
        margin-top: 16px;
      }
      .learn-week-nav .btn {
        white-space: nowrap;
      }
      details.sheet {
        margin-top: 14px;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: var(--r);
        padding: 14px 16px;
      }
      details.sheet summary {
        font-weight: 700;
        cursor: pointer;
        min-height: 32px;
      }
      /* segmented */
      .seg {
        display: flex;
        gap: 8px;
        margin-top: 8px;
      }
      .seg button {
        flex: 1;
        border: 1.5px solid var(--line);
        background: var(--surface);
        color: var(--ink);
        border-radius: 12px;
        padding: 12px 6px;
        font-weight: 700;
        font-size: 15px;
        min-height: 50px;
      }
      .seg button.on {
        background: var(--blue);
        border-color: var(--blue);
        color: #fff;
      }
      /* revision tabs */
      .revtabs {
        display: flex;
        background: var(--surface2);
        border: 1px solid var(--line);
        border-radius: 12px;
        padding: 4px;
        gap: 4px;
        margin-top: 16px;
        overflow: visible;
      }
      .revtabs button {
        flex: 1;
        border: 0;
        background: none;
        color: var(--muted);
        font-weight: 700;
        font-size: 13px;
        padding: 10px 3px;
        border-radius: 9px;
        white-space: normal;
        min-width: 0;
        min-height: 44px;
      }
      .revtabs button.on {
        background: var(--blue);
        color: #fff;
      }
      /* flashcard */
      .flash {
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: var(--r);
        padding: 20px 16px;
        box-shadow: var(--shadow);
        margin-top: 16px;
      }
      .flash .opts {
        margin-top: 14px;
      }
      .flash .opt {
        cursor: default;
      }
      /* stats */
      .stat-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-top: 16px;
      }
      @media (min-width: 768px) {
        .stat-grid {
          grid-template-columns: repeat(4, minmax(0, 1fr));
          gap: 14px;
        }
      }
      .stat {
        min-width: 0;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: var(--r);
        padding: 16px;
        box-shadow: var(--shadow);
      }
      .stat .n {
        font-size: 27px;
        font-weight: 800;
        color: var(--head);
      }
      .stat .l {
        color: var(--muted);
        font-size: 13px;
        margin-top: 2px;
      }
      .list {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 14px;
      }
      .item {
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: var(--r);
        padding: 16px;
        box-shadow: var(--shadow);
      }
      .item .q {
        font-weight: 650;
      }
      .tag {
        display: inline-block;
        font-size: 12px;
        font-weight: 700;
        padding: 3px 9px;
        border-radius: 999px;
        background: var(--surface2);
        color: var(--muted);
      }
      .tag.g {
        background: var(--green-bg);
        color: var(--green);
      }
      .tag.r {
        background: var(--red-bg);
        color: var(--red);
      }
      .tag.a {
        background: var(--amber-bg);
        color: var(--amber-tx);
      }
      .tag.b {
        background: var(--blue-soft);
        color: var(--navy2);
      }
      .filters {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        margin-top: 14px;
      }
      .filters select,
      .filters input {
        border: 1.5px solid var(--line);
        background: var(--surface);
        border-radius: 10px;
        padding: 10px 12px;
        min-height: 44px;
        font-size: 14.5px;
      }
      .chip {
        border: 1.5px solid var(--line);
        background: var(--surface);
        border-radius: 999px;
        padding: 9px 14px;
        font-weight: 600;
        font-size: 14px;
        min-height: 44px;
        color: var(--ink);
      }
      .chip.on {
        background: var(--blue);
        color: #fff;
        border-color: var(--blue);
      }
      label.f {
        display: block;
        font-weight: 700;
        font-size: 14px;
        margin: 16px 0 6px;
      }
      select.inp,
      input.inp,
      textarea.inp {
        width: 100%;
        border: 1.5px solid var(--line);
        background: var(--surface);
        border-radius: 12px;
        padding: 12px;
        font-size: 15.5px;
        min-height: 48px;
      }
      textarea.inp {
        min-height: 72px;
      }
      .weekchecks {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
        margin-top: 8px;
      }
      @media (min-width: 640px) {
        .weekchecks {
          grid-template-columns: repeat(6, minmax(0, 1fr));
        }
      }
      .wc {
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 6px;
        border: 1.5px solid var(--line);
        border-radius: 10px;
        padding: 10px;
        min-height: 44px;
        font-weight: 600;
        font-size: 14px;
        background: var(--surface);
      }
      .wc input {
        width: 18px;
        height: 18px;
        accent-color: var(--blue);
      }
      .poolchips {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 8px;
      }
      .empty {
        background: var(--surface);
        border: 1.5px dashed var(--line);
        border-radius: var(--r);
        padding: 28px 20px;
        text-align: center;
        color: var(--muted);
        margin-top: 16px;
      }
      .empty b {
        color: var(--ink);
        display: block;
        font-size: 16px;
        margin-bottom: 4px;
      }
      .review-opt {
        border: 1px solid var(--line);
        border-radius: 10px;
        padding: 10px 12px;
        margin-top: 6px;
        font-size: 14.5px;
      }
      .review-opt.c {
        border-color: var(--green);
        background: var(--green-bg);
      }
      .review-opt.w {
        border-color: var(--red);
        background: var(--red-bg);
      }
      table {
        border-collapse: collapse;
        width: 100%;
        font-size: 14px;
      }
      th,
      td {
        text-align: left;
        padding: 9px 8px;
        border-bottom: 1px solid var(--line);
        vertical-align: top;
      }
      dialog {
        border: 1px solid var(--line);
        border-radius: 16px;
        background: var(--surface);
        color: var(--ink);
        max-width: 420px;
        width: calc(100% - 32px);
        padding: 22px;
      }
      dialog::backdrop {
        background: rgba(3, 10, 22, 0.6);
      }
      /* bottom nav mobile */
      .bnav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 45;
        background: var(--surface);
        border-top: 1px solid var(--line);
        display: flex;
        padding-bottom: env(safe-area-inset-bottom, 0px);
      }
      .bnav button {
        flex: 1;
        background: none;
        border: 0;
        padding: 8px 2px 9px;
        font-size: 11px;
        font-weight: 700;
        color: var(--muted);
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        min-height: var(--bottom-h);
      }
      .bnav button .ic {
        font-size: 19px;
        line-height: 1;
      }
      .bnav button.on {
        color: var(--blue);
      }
      @media (min-width: 900px) {
        .bnav {
          display: none !important;
        }
      }
      footer {
        border-top: 1px solid var(--line);
        background: var(--surface);
        margin-top: 48px;
        padding: 22px 0 calc(var(--bottom-h) + 20px);
      }
      @media (min-width: 900px) {
        footer {
          padding-bottom: 28px;
        }
      }
      footer .muted {
        color: var(--muted);
        font-size: 13.5px;
      }
      .foot-brand {
        display: flex;
        align-items: center;
        gap: 8px;
        font-weight: 700;
        font-size: 15px;
        color: var(--ink);
      }
      .foot-credit {
        margin-top: 8px;
        color: var(--muted);
        font-size: 13.5px;
      }
      .foot-credit a {
        font-weight: 700;
      }
      .foot-links {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-top: 14px;
        font-size: 13.5px;
      }
      .foot-links a {
        color: var(--muted);
        font-weight: 600;
        text-decoration: none;
      }
      .foot-links a:hover {
        color: var(--blue);
      }
      .foot-sep {
        color: var(--muted);
        opacity: 0.6;
      }
      .toast {
        position: fixed;
        left: 50%;
        transform: translateX(-50%);
        bottom: calc(var(--bottom-h) + 76px);
        z-index: 60;
        background: var(--ink);
        color: var(--bg);
        padding: 11px 18px;
        border-radius: 999px;
        font-weight: 600;
        font-size: 14px;
        display: none;
        max-width: 92vw;
        text-align: center;
      }
      .toast.on {
        display: block;
      }
      .ring-wrap {
        display: flex;
        align-items: center;
        gap: 18px;
      }
      .ring {
        position: relative;
        width: 76px;
        height: 76px;
        flex-shrink: 0;
      }
      .ring svg {
        transform: rotate(-90deg);
      }
      .ring .pct {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 800;
        font-size: 17px;
      }
      details.faq {
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: var(--r);
        padding: 14px 16px;
        margin-top: 10px;
      }
      details.faq summary {
        font-weight: 700;
        cursor: pointer;
      }
      details.faq p {
        color: var(--muted);
        margin-top: 8px;
        font-size: 14.5px;
      }
      .note-box {
        background: var(--surface2);
        border-radius: 12px;
        padding: 12px;
        margin-top: 12px;
      }
      .small {
        font-size: 13.5px;
        color: var(--muted);
      }
      .kbd {
        background: var(--surface2);
        border: 1px solid var(--line);
        border-radius: 6px;
        padding: 1px 7px;
        font-size: 12.5px;
        font-weight: 700;
      }
      /* profile */
      .avatar-big {
        width: 84px;
        height: 84px;
        border-radius: 50%;
        background: var(--blue);
        color: #fff;
        font-size: 34px;
        font-weight: 800;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 10px auto 0;
      }
      .prof-rows {
        margin-top: 20px;
        display: flex;
        flex-direction: column;
      }
      .prof-row {
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
        background: var(--surface);
        border: 1px solid var(--line);
        border-bottom: 0;
        padding: 15px 16px;
        color: var(--ink);
        font-weight: 600;
        font-size: 15px;
        text-align: left;
        min-height: 54px;
      }
      .prof-row:first-child {
        border-radius: var(--r) var(--r) 0 0;
      }
      .prof-row:last-child {
        border-bottom: 1px solid var(--line);
        border-radius: 0 0 var(--r) var(--r);
      }
      .prof-row .ic {
        width: 22px;
        display: flex;
        justify-content: center;
        color: var(--muted);
        flex-shrink: 0;
      }
      .prof-row .chev {
        margin-left: auto;
        color: var(--muted);
      }
      .prof-row .val {
        margin-left: auto;
        color: var(--muted);
        font-weight: 600;
        font-size: 14px;
      }
      .prof-row.danger {
        color: var(--red);
      }
      .prof-row.danger .ic {
        color: var(--red);
      }
      /* touch smoothness */
      * {
        -webkit-tap-highlight-color: transparent;
      }
      button,
      .opt,
      .chip,
      .pal-btn {
        touch-action: manipulation;
      }
      .opt {
        transition:
          border-color 0.15s ease,
          background 0.15s ease,
          transform 0.1s ease;
      }
      .opt:active {
        transform: scale(0.99);
      }
      .btn,
      .tool-btn,
      .icon-btn {
        transition:
          background 0.15s ease,
          border-color 0.15s ease,
          transform 0.1s ease,
          opacity 0.15s ease;
      }
      .q-card {
        animation: qin 0.22s ease;
      }
      @keyframes qin {
        from {
          opacity: 0.4;
          transform: translateY(4px);
        }
        to {
          opacity: 1;
          transform: none;
        }
      }
      @media (prefers-reduced-motion: reduce) {
        .q-card {
          animation: none;
        }
        .timer.low {
          animation: none;
        }
      }
      .lobj,
      .lkey {
        list-style: none;
        margin: 10px 0 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 9px;
      }
      .lobj li,
      .lkey li {
        line-height: 1.55;
      }
      .lobj li::before {
        content: "";
        display: inline-block;
        width: 13px;
        height: 13px;
        margin-right: 8px;
        vertical-align: -1px;
        background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4.5 12.5l5 5L19.5 7' fill='none' stroke='%2312A66A' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
          center / contain no-repeat;
      }
      .lkey li::before {
        content: "";
        display: inline-block;
        width: 13px;
        height: 13px;
        margin-right: 8px;
        vertical-align: -1px;
        background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23F59E0B' d='M12 3.4l2.6 5.4 5.9.8-4.3 4.1 1 5.8L12 16.7l-5.2 2.8 1-5.8-4.3-4.1 5.9-.8z'/%3E%3C/svg%3E")
          center / contain no-repeat;
      }
      /* ===== polish pass: depth, rhythm, iconography ===== */
      :root {
        --r: 20px;
        --shadow:
          0 1px 2px rgba(16, 28, 74, 0.06), 0 4px 14px rgba(16, 28, 74, 0.07),
          0 14px 34px rgba(16, 28, 74, 0.05);
        --shadow-lg:
          0 2px 6px rgba(16, 28, 74, 0.08), 0 18px 44px rgba(16, 28, 74, 0.14);
      }
      [data-theme="dark"] {
        --shadow:
          0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 18px rgba(0, 0, 0, 0.3),
          0 16px 38px rgba(0, 0, 0, 0.22);
        --shadow-lg:
          0 2px 6px rgba(0, 0, 0, 0.35), 0 20px 48px rgba(0, 0, 0, 0.4);
      }
      body {
        letter-spacing: -0.006em;
      }
      ::selection {
        background: var(--blue);
        color: #fff;
      }
      header.top {
        background: color-mix(in srgb, var(--bg) 86%, transparent);
        backdrop-filter: blur(12px) saturate(1.5);
        -webkit-backdrop-filter: blur(12px) saturate(1.5);
      }
      .brand {
        font-size: 16.5px;
        letter-spacing: -0.01em;
      }
      .icon-btn {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        box-shadow: 0 1px 3px rgba(16, 28, 74, 0.06);
      }
      .icon-btn svg {
        flex-shrink: 0;
      }
      .ham-btn {
        border-radius: 12px;
      }
      .avatar-btn {
        box-shadow: 0 4px 12px rgba(40, 120, 249, 0.35);
      }
      #app > * {
        animation: vin 0.28s cubic-bezier(0.2, 0.7, 0.3, 1);
      }
      @keyframes vin {
        from {
          opacity: 0;
          transform: translateY(6px);
        }
        to {
          opacity: 1;
          transform: none;
        }
      }
      @media (prefers-reduced-motion: reduce) {
        #app > * {
          animation: none;
        }
      }
      .hero {
        padding: 34px 0 4px;
      }
      .hero h1 {
        font-size: 34px;
        letter-spacing: -0.025em;
        line-height: 1.12;
      }
      .illus {
        max-width: 372px;
        width: 100%;
        margin: 26px auto 6px;
        display: block;
      }
      .feat {
        gap: 12px;
        margin-top: 22px;
      }
      .feat .ck {
        width: 21px;
        height: 21px;
        font-size: 12px;
        box-shadow: 0 2px 6px rgba(18, 166, 106, 0.35);
      }
      .btn {
        border-radius: 13px;
      }
      .btn-p {
        box-shadow:
          0 8px 20px rgba(40, 120, 249, 0.3),
          0 2px 6px rgba(40, 120, 249, 0.22);
      }
      .btn-p:hover {
        opacity: 1;
        filter: brightness(1.05);
      }
      .btn-s {
        box-shadow: 0 1px 3px rgba(16, 28, 74, 0.05);
      }
      .btn-g {
        box-shadow: inset 0 0 0 1px var(--line);
      }
      .mode-card {
        transition:
          transform 0.16s ease,
          box-shadow 0.16s ease,
          border-color 0.16s ease;
      }
      .week-row {
        transition:
          border-color 0.16s ease,
          box-shadow 0.16s ease;
      }
      @media (hover: hover) {
        .mode-card:hover {
          transform: translateY(-2px);
          box-shadow: var(--shadow-lg);
          border-color: var(--blue);
        }
        .week-row:hover {
          border-color: var(--blue);
        }
      }
      .tile {
        box-shadow:
          inset 0 -8px 14px rgba(0, 0, 0, 0.1),
          0 4px 10px rgba(16, 28, 74, 0.14);
      }
      .wtile {
        box-shadow:
          inset 0 -8px 14px rgba(0, 0, 0, 0.1),
          0 4px 10px rgba(16, 28, 74, 0.12);
      }
      .q-card {
        box-shadow: var(--shadow-lg);
      }
      .q-text {
        letter-spacing: -0.008em;
      }
      .opt {
        box-shadow: 0 1px 3px rgba(16, 28, 74, 0.05);
      }
      .opt.sel {
        box-shadow:
          0 0 0 3px var(--blue-soft),
          0 2px 8px rgba(40, 120, 249, 0.12);
      }
      .progress {
        box-shadow: inset 0 1px 2px rgba(16, 28, 74, 0.1);
      }
      .p-bar {
        box-shadow: 0 -8px 24px rgba(16, 28, 74, 0.1);
        background: color-mix(in srgb, var(--surface) 92%, transparent);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
      }
      .bnav {
        background: color-mix(in srgb, var(--surface) 94%, transparent);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        box-shadow: 0 -6px 20px rgba(16, 28, 74, 0.06);
      }
      .bnav button {
        gap: 3px;
        position: relative;
      }
      .bnav button .ic {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 24px;
        font-size: 0;
      }
      .bnav button.on::before {
        content: "";
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 22px;
        height: 3px;
        border-radius: 0 0 4px 4px;
        background: var(--blue);
      }
      .field input {
        transition:
          border-color 0.15s,
          box-shadow 0.15s;
      }
      .field input:focus {
        box-shadow: 0 0 0 4px var(--blue-soft);
      }
      .field .eye {
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
      }
      .searchbox {
        transition:
          border-color 0.15s,
          box-shadow 0.15s;
      }
      .searchbox:focus-within {
        box-shadow:
          0 0 0 4px var(--blue-soft),
          var(--shadow);
      }
      .seg button {
        transition:
          background 0.15s,
          color 0.15s,
          border-color 0.15s;
      }
      .seg button.on {
        box-shadow: 0 6px 14px rgba(40, 120, 249, 0.28);
      }
      .revtabs {
        box-shadow: inset 0 1px 3px rgba(16, 28, 74, 0.05);
      }
      .revtabs button.on {
        box-shadow: 0 4px 10px rgba(40, 120, 249, 0.25);
      }
      .chip {
        transition:
          background 0.15s,
          color 0.15s,
          border-color 0.15s;
      }
      .tool-btn {
        transition:
          background 0.15s,
          border-color 0.15s;
      }
      .pal-btn {
        transition:
          transform 0.1s,
          background 0.15s,
          border-color 0.15s;
      }
      .pal-btn:active {
        transform: scale(0.94);
      }
      dialog {
        box-shadow: var(--shadow-lg);
        border: 0;
      }
      .toast {
        box-shadow: var(--shadow-lg);
      }
      .stat .n {
        letter-spacing: -0.02em;
      }
      .prof-row {
        transition: background 0.15s;
      }
      .prof-row:hover {
        background: var(--surface2);
      }
      .avatar-big {
        box-shadow: 0 10px 24px rgba(40, 120, 249, 0.32);
      }
      .timer {
        box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15);
      }
      footer {
        margin-top: 56px;
      }

      /* ==================================================================
         FIX + REDESIGN SWEEP — narrow-screen chrome, feedback, polish.
         These rules come last so they win over earlier sections.
         ================================================================== */
      html,
      body {
        overflow-x: clip;
      }
      .card,
      .wrap,
      .narrow {
        min-width: 0;
      }
      /* header: everything fits at 320-430px */
      .brand {
        flex-shrink: 1;
        min-width: 0;
        overflow: hidden;
      }
      @media (max-width: 520px) {
        .top-in {
          gap: 6px;
          padding: 0 10px;
        }
        .brand {
          font-size: 15px;
          gap: 6px;
        }
        .brand svg {
          width: 22px;
          height: 22px;
        }
        .icon-btn {
          padding: 7px 11px;
          font-size: 13px;
          min-height: 38px;
        }
        .avatar-btn {
          width: 34px;
          height: 34px;
          font-size: 13px;
        }
        .ham-btn {
          width: 36px;
          height: 36px;
        }
      }
      @media (max-width: 350px) {
        .brand {
          font-size: 14px;
        }
        .icon-btn {
          padding: 6px 9px;
        }
      }
      /* header fit at phone widths: short brand <=430px, icon-only
         theme pill <=380px — nothing clipped at 320-430px */
      .brand-short {
        display: none;
      }
      @media (max-width: 430px) {
        .brand-long {
          display: none;
        }
        .brand-short {
          display: inline;
        }
      }
      @media (max-width: 380px) {
        .theme-lbl {
          display: none;
        }
        #themeBtn {
          padding: 7px 10px;
        }
      }
      /* dark theme elevation: lifted surfaces, visible card edges,
         subtle top highlight so cards separate from the page */
      [data-theme="dark"] .card,
      [data-theme="dark"] .auth-card,
      [data-theme="dark"] details.faq,
      [data-theme="dark"] .mode-card,
      [data-theme="dark"] .cap,
      [data-theme="dark"] .xlist {
        box-shadow:
          inset 0 1px 0 rgba(165, 205, 255, 0.1),
          var(--shadow);
      }
      [data-theme="dark"] .q-card {
        box-shadow:
          inset 0 1px 0 rgba(165, 205, 255, 0.1),
          var(--shadow-lg);
      }
      /* "Explore the app" compact rows on Home */
      .xlist {
        margin-top: 12px;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: var(--r);
        box-shadow: var(--shadow);
        overflow: hidden;
      }
      .xrow {
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
        text-align: left;
        background: none;
        border: 0;
        border-bottom: 1px solid var(--line);
        padding: 10px 14px;
        color: var(--ink);
      }
      .xrow:last-child {
        border-bottom: 0;
      }
      .xrow .xt {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
      }
      .xrow .xt b {
        font-size: 14.5px;
        line-height: 1.3;
      }
      .xrow .xt span {
        color: var(--muted);
        font-size: 12.5px;
        line-height: 1.35;
      }
      .xchev {
        width: 8px;
        height: 8px;
        border-right: 2px solid var(--muted);
        border-bottom: 2px solid var(--muted);
        transform: rotate(-45deg);
        flex-shrink: 0;
        margin-right: 3px;
      }
      .tile.tile-sm {
        width: 34px;
        height: 34px;
        border-radius: 9px;
      }
      .tile.tile-sm svg {
        width: 19px;
        height: 19px;
      }
      /* Welcome "What you can do here" grid */
      .caps {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-top: 14px;
      }
      @media (max-width: 400px) {
        .caps {
          grid-template-columns: minmax(0, 1fr);
        }
      }
      .cap {
        display: flex;
        gap: 10px;
        align-items: flex-start;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: 14px;
        padding: 12px;
        box-shadow: var(--shadow);
        min-width: 0;
      }
      .cap .cic {
        color: var(--blue);
        display: flex;
        flex-shrink: 0;
        margin-top: 1px;
      }
      .cap b {
        display: block;
        font-size: 14px;
        line-height: 1.3;
      }
      .cap span {
        display: block;
        color: var(--muted);
        font-size: 12.5px;
        line-height: 1.4;
        margin-top: 2px;
      }
      /* bottom nav: all five items fit at 320px */
      .bnav button {
        flex: 1 1 0;
        min-width: 0;
        white-space: nowrap;
        padding: 7px 0 8px;
      }
      @media (max-width: 380px) {
        .bnav button {
          font-size: 10.5px;
        }
        .bnav button .ic svg {
          width: 20px;
          height: 20px;
        }
      }
      /* toast: small, low, out of the way */
      .toast {
        bottom: calc(var(--bottom-h) + 12px);
        padding: 9px 16px;
        font-size: 13.5px;
        line-height: 1.35;
        max-width: min(92vw, 430px);
        box-shadow: var(--shadow-lg);
        pointer-events: none;
      }
      .toast.up {
        bottom: calc(var(--bottom-h) + 76px);
      }
      /* practice bar: one action row, labels never wrap, mobile only */
      @media (min-width: 900px) {
        .p-bar {
          display: none !important;
        }
      }
      .p-bar .btn {
        white-space: nowrap;
        min-width: 0;
      }
      #pbPrev,
      #pbNext {
        flex: 0 0 auto;
      }
      #pbSubmit {
        flex: 1 1 auto;
      }
      @media (max-width: 380px) {
        .p-bar {
          padding-left: 8px;
          padding-right: 8px;
        }
        .p-bar .btn {
          font-size: 14px;
          padding-left: 9px;
          padding-right: 9px;
        }
      }
      /* session progress: clearly visible track + fill */
      .progress {
        height: 10px;
        background: var(--line);
      }
      .progress i:not([style*="width:0%"]) {
        min-width: 14px;
      }
      .prog {
        height: 10px;
        background: var(--line);
        border-radius: 99px;
        overflow: hidden;
      }
      .prog i {
        display: block;
        height: 100%;
        border-radius: 99px;
      }
      /* keyboard hints: desktop with a fine pointer only */
      .kbd-hint {
        display: none;
      }
      @media (min-width: 900px) and (pointer: fine) {
        .kbd-hint {
          display: block;
        }
      }
      /* disclosure sheets: SVG-style chevron, no raw text glyph */
      details.sheet summary,
      details.faq summary {
        list-style: none;
      }
      details.sheet summary::-webkit-details-marker,
      details.faq summary::-webkit-details-marker {
        display: none;
      }
      details.sheet summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
      }
      details.sheet summary::after {
        content: "";
        flex-shrink: 0;
        width: 9px;
        height: 9px;
        border-right: 2.5px solid var(--muted);
        border-bottom: 2.5px solid var(--muted);
        transform: rotate(45deg);
        transition: transform 0.18s;
        margin-right: 5px;
      }
      details.sheet[open] summary::after {
        transform: rotate(-135deg);
      }
      /* options after checking: only your answer + accepted get colour */
      .opt:not(:disabled):hover {
        border-color: var(--sel);
      }
      .opts.locked .opt {
        border-color: var(--line);
      }
      .opts.locked .opt.correct {
        border-color: var(--green);
        opacity: 1;
      }
      .opts.locked .opt.wrong {
        border-color: var(--red);
        opacity: 1;
      }
      .opts.locked .opt:not(.correct):not(.wrong) {
        opacity: 0.7;
      }
      /* merged feedback block */
      .feedback {
        border-radius: 16px;
      }
      .feedback.ok,
      [data-theme="light"] .feedback.ok {
        background: var(--green-bg);
        color: var(--green);
      }
      .feedback.bad,
      [data-theme="light"] .feedback.bad {
        background: var(--red-bg);
        color: var(--red);
      }
      .feedback .fb-head {
        display: flex;
        align-items: center;
        gap: 9px;
        font-size: 16.5px;
        font-weight: 800;
      }
      .feedback .fb-ic {
        flex-shrink: 0;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: var(--green);
      }
      .feedback.bad .fb-ic {
        background: var(--red);
      }
      .feedback .fb-acc {
        font-weight: 700;
        font-size: 15px;
        margin-top: 7px;
      }
      .feedback .noexp {
        font-weight: 600;
        font-size: 13.5px;
        opacity: 0.85;
        margin-top: 2px;
      }
      .feedback .sub {
        margin-top: 5px;
      }
      /* learn: entry cards stack on phones, comfortable rows */
      @media (max-width: 639px) {
        .learn-modes {
          grid-template-columns: minmax(0, 1fr);
        }
        .learn-modes .mode-card {
          display: flex;
          align-items: flex-start;
          gap: 12px;
        }
        .learn-modes .mode-card h3 {
          margin: 2px 0 3px;
        }
      }
      .continue-card {
        background: var(--blue-soft);
        border: 1.5px solid var(--blue);
      }
      .week-list {
        gap: 12px;
      }
      .week-row {
        padding: 16px;
      }
      .week-row .wtile {
        width: 48px;
        height: 48px;
        border-radius: 14px;
        box-shadow: 0 4px 10px rgba(16, 28, 74, 0.18);
      }
      .week-row .info b {
        font-size: 15.5px;
        line-height: 1.3;
      }
      /* general polish: radii, rhythm, affordances */
      .card,
      .item {
        border-radius: 20px;
      }
      .q-card {
        border-radius: 20px;
        padding: 22px 18px;
      }
      .q-text {
        font-size: 19px;
        font-weight: 700;
        line-height: 1.45;
        color: var(--head);
      }
      .opt {
        border-radius: 16px;
      }
      .btn-p {
        box-shadow: 0 6px 16px rgba(40, 120, 249, 0.25);
      }
      .tool-btn {
        display: inline-flex;
        align-items: center;
        gap: 7px;
      }
      .tag {
        padding: 4px 10px;
      }
      .tag .dot {
        display: inline-block;
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: var(--green);
        margin-right: 5px;
        vertical-align: 1px;
      }
      .note-box {
        background: var(--blue-soft);
        border-radius: 14px;
        padding: 14px 16px;
      }
      details.sheet {
        border-radius: 20px;
      }
      .acc-box {
        border-radius: 16px;
      }
      .searchbox {
        border-radius: 16px;
      }
      dialog {
        border-radius: 20px;
      }
      .lkey li::before {
        content: "";
        display: inline-block;
        width: 13px;
        height: 13px;
        margin-right: 8px;
        vertical-align: -1px;
        background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23F59E0B' d='M12 3.4l2.6 5.4 5.9.8-4.3 4.1 1 5.8L12 16.7l-5.2 2.8 1-5.8-4.3-4.1 5.9-.8z'/%3E%3C/svg%3E")
          center / contain no-repeat;
      }

      /* revision tabs: 2x2 grid on phones — all four always visible */
      @media (max-width: 640px) {
        .revtabs {
          display: grid;
          grid-template-columns: repeat(2, minmax(0, 1fr));
          overflow: visible;
        }
        .revtabs button {
          white-space: normal;
          font-size: 13.5px;
          padding: 11px 6px;
          line-height: 1.25;
        }
      }
      /* lesson view: reading quality */
      .lesson-sec {
        padding: 18px;
      }
      .lesson-sec > b {
        font-size: 16.5px;
        letter-spacing: -0.01em;
        color: var(--head);
      }
      .lesson-sec p {
        font-size: 16px;
        line-height: 1.66;
      }
      .lobj,
      .lkey {
        margin: 10px 0 2px;
        padding: 0;
      }
      .lobj li,
      .lkey li {
        font-size: 15.5px;
        line-height: 1.55;
        padding: 4px 0;
      }

      /* ==================================================================
         PREMIUM DESIGN PASS — summary chips (Home), fact rows
         (Source & Limits), slim exam-date row. Token-driven so both
         themes style identically.
         ================================================================== */
      .sum-chips {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
        margin-top: 14px;
      }
      .sum-chip {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: 16px;
        padding: 10px 12px;
        box-shadow: var(--shadow);
        min-width: 0;
      }
      .sum-chip .sc-top {
        display: flex;
        align-items: center;
        gap: 8px;
        min-width: 0;
      }
      .sum-chip .sc-top b {
        font-size: 16px;
        color: var(--head);
        line-height: 1.1;
      }
      .sum-chip .sc-lbl {
        font-size: 11px;
        color: var(--muted);
        font-weight: 600;
        white-space: nowrap;
        line-height: 1.15;
      }
      .fact-list {
        margin-top: 16px;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: 20px;
        box-shadow: var(--shadow);
        overflow: hidden;
      }
      .fact-row {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 13px 16px;
        border-bottom: 1px solid var(--line);
        min-width: 0;
      }
      .fact-row:last-child {
        border-bottom: 0;
      }
      .fact-txt {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
      }
      .fact-txt b {
        font-size: 14.5px;
        color: var(--head);
        line-height: 1.3;
      }
      .fact-txt span {
        font-size: 13px;
        color: var(--muted);
        line-height: 1.4;
      }
      .fact-txt .fact-file {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      .exam-slim {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        margin-top: 16px;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: 16px;
        padding: 12px 14px;
        box-shadow: var(--shadow);
        color: var(--ink);
        font-weight: 700;
        font-size: 14.5px;
        text-align: left;
        min-width: 0;
      }
      .exam-slim .chev {
        flex-shrink: 0;
        width: 8px;
        height: 8px;
        border-right: 2.5px solid var(--muted);
        border-top: 2.5px solid var(--muted);
        transform: rotate(45deg);
        margin-left: auto;
        margin-right: 3px;
      }
      /* nav + revision fix bundle (last rules win) */
      .crumb-link {
        background: none;
        border: 0;
        padding: 0;
        font: inherit;
        color: var(--muted);
        cursor: pointer;
        font-weight: 600;
      }
      .crumb-link:hover {
        color: var(--blue);
        text-decoration: underline;
      }
      .revtabs {
        background: transparent;
        border: 0;
        box-shadow: none;
        padding: 0;
        gap: 8px;
        margin-top: 12px;
      }
      .revtabs button {
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: 999px;
        color: var(--ink);
        box-shadow: var(--shadow);
      }
      .revtabs button.on {
        background: var(--blue);
        border-color: var(--blue);
        color: #fff;
        box-shadow: 0 4px 10px rgba(40, 120, 249, 0.25);
      }
      .rev-head {
        display: flex;
        gap: 6px;
        flex-wrap: nowrap;
        align-items: center;
        min-width: 0;
      }
      .rev-head .tag {
        font-size: 11px;
        padding: 3px 6px;
        white-space: nowrap;
        flex-shrink: 0;
      }
      .rev-head .tag:last-child {
        flex-shrink: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      .ans-block {
        margin-top: 8px;
        display: flex;
        flex-direction: column;
        gap: 3px;
      }
      .ans-block p {
        font-size: 14px;
        color: var(--ink);
      }
      .ans-x {
        color: var(--red);
        font-weight: 800;
        margin-right: 2px;
      }
      .ans-c {
        color: var(--green);
        font-weight: 800;
        margin-right: 2px;
      }
      .rev-meta {
        font-size: 12px;
        color: var(--muted);
        margin-top: 6px;
      }
      .rev-acts {
        display: flex;
        gap: 8px;
        margin-top: 10px;
        flex-wrap: wrap;
      }
      /* ===== FINAL FIX BUNDLE: session scroll clearance + revision header fit ===== */
      html {
        scroll-padding-top: calc(var(--header-h) + 96px);
      }
      body:has(.p-bar.on) main {
        padding-bottom: calc(
          var(--bottom-h) + 88px + env(safe-area-inset-bottom, 0px)
        );
      }
      .ses-head {
        border-bottom: 1px solid var(--line);
      }
      .q-tools {
        max-width: 100%;
      }
      .q-tools .tool-btn {
        min-width: 0;
      }
      .rev-head {
        gap: 4px;
      }
      .rev-head > span[style] {
        width: 22px !important;
        height: 22px !important;
      }
      .rev-head .tag {
        font-size: 10.5px;
        padding: 2px 5px;
        letter-spacing: -0.01em;
        flex-shrink: 0;
      }
      .rev-head .tag:last-child {
        flex-shrink: 0;
        min-width: 0;
        overflow: visible;
        text-overflow: clip;
      }
      @media (max-width: 345px) {
        .rev-head {
          flex-wrap: wrap;
        }
      }
      /* ===== Phase 2 auth redesign (Google button, divider, heads) ===== */
      .gbtn {
        background: #fff;
        color: #1f1f1f;
        border: 1.5px solid var(--line);
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 2px;
        font-weight: 600;
      }
      .gbtn:hover {
        background: #f8fafd;
      }
      .gbtn:active {
        transform: scale(0.99);
      }
      [data-theme="dark"] .gbtn {
        background: #12263f;
        color: #f5f7fc;
        border-color: #2a4a73;
      }
      [data-theme="dark"] .gbtn:hover {
        background: #17304f;
      }
      .auth-or {
        display: flex;
        align-items: center;
        gap: 12px;
        margin: 16px 0 2px;
        color: var(--muted);
        font-size: 13px;
      }
      .auth-or::before,
      .auth-or::after {
        content: "";
        flex: 1;
        height: 1px;
        background: var(--line);
      }
      .auth-head {
        margin-top: 6px;
      }
      .auth-head h2 {
        font-size: 26px;
        font-weight: 800;
        color: var(--navy);
      }
      .auth-head .small {
        margin-top: 5px;
      }
      .auth-note {
        text-align: center;
        margin-top: 14px;
        font-size: 13px;
        color: var(--muted);
      }

      /* ==================================================================
         WELCOME REDESIGN — lower section only (owner order 2026-10-24).
         Scoped with :has(main .hero): .hero exists ONLY on the welcome
         view, so no other screen's layout, footer or nav is touched.
         Headline, Google button and Email button are NOT restyled here.
         ================================================================== */
      /* Page becomes a flex column so the footer pins to the viewport
         bottom instead of floating below a dead gap; main grows. */
      body:has(main .hero) {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
        min-height: 100dvh;
      }
      body:has(main .hero) main {
        flex: 1 0 auto;
        display: flex;
        flex-direction: column;
        padding-bottom: 0; /* welcome has no bottom nav: kill the 94px clearance */
      }
      body:has(main .hero) main .wrap,
      body:has(main .hero) main .narrow {
        flex: 1;
        display: flex;
        flex-direction: column;
      }
      /* Hero distributes its own height: even rhythm, no single void. */
      body:has(main .hero) .hero {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-evenly;
        padding: 12px 0 8px;
      }
      /* Note: same words, calmer colour, centred, capped width. */
      .wel-note {
        text-align: center;
        margin-top: 20px;
        font-size: 14.5px;
        line-height: 1.5;
        color: var(--muted);
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
      }
      /* Owner order 2026-10-24: the meta block (subject chip + stats
         strip) was REMOVED from the welcome view — no subject name, no
         week range, no question count on the login page. The .hero uses
         space-evenly distribution, so the removed block leaves no void;
         the footer block below is unchanged. */
      /* Footer on welcome: hugs the content, no fake bottom-nav
         clearance, centred composition, hairline divider kept. */
      body:has(main .hero) footer {
        margin-top: 0;
        padding: 20px 0 calc(22px + env(safe-area-inset-bottom, 0px));
      }
      body:has(main .hero) footer .foot-brand {
        justify-content: center;
      }
      body:has(main .hero) footer .foot-credit {
        text-align: center;
        margin-top: 6px;
      }
      body:has(main .hero) footer .foot-links {
        justify-content: center;
        margin-top: 12px;
        gap: 14px;
      }
      /* (dark .wel-subj rule removed with the meta block above.) */
