﻿:root {
      --accent: #ef3124;
      --accent-dark: #c8281e;
      --accent-soft: rgba(239, 49, 36, 0.08);
      --surface: #ffffff;
      --surface-alt: #f0f1f4;
      --text: #171717;
      --muted: #666b76;
      --border: rgba(23, 23, 23, 0.08);
      --shadow: 0 18px 50px rgba(16, 24, 40, 0.08);
      --radius-xl: 28px;
      --radius-lg: 22px;
      --radius-md: 16px;
      --font: "Segoe UI Variable", "Segoe UI", "Helvetica Neue", sans-serif;
    }

    * {
      box-sizing: border-box;
    }

    body {
      margin: 0;
      font-family: var(--font);
      color: var(--text);
      background:
        radial-gradient(circle at top left, rgba(239, 49, 36, 0.12), transparent 32%),
        linear-gradient(180deg, #fcfcfd 0%, #f2f3f6 100%);
      min-height: 100vh;
    }

    button {
      font: inherit;
    }

    .app-shell {
      display: grid;
      grid-template-columns: 320px minmax(0, 1fr);
      gap: 24px;
      padding: 24px;
      min-height: 100vh;
    }

    .panel {
      background: rgba(255, 255, 255, 0.92);
      border: 1px solid rgba(255, 255, 255, 0.6);
      backdrop-filter: blur(12px);
      border-radius: var(--radius-xl);
      box-shadow: var(--shadow);
    }

    .sidebar {
      padding: 20px;
      display: flex;
      flex-direction: column;
      gap: 18px;
    }

    .brand {
      background: linear-gradient(135deg, #1d1d1f 0%, #2f2f34 35%, var(--accent) 100%);
      color: white;
      border-radius: var(--radius-lg);
      padding: 24px;
      display: grid;
      gap: 10px;
    }

    .brand h1,
    .content-head h2,
    .result-header h3,
    .column-card h3 {
      margin: 0;
    }

    .eyebrow {
      font-size: 12px;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      opacity: 0.72;
    }

    .brand p,
    .content-head p,
    .result-empty p,
    .status-banner p {
      margin: 0;
      color: inherit;
    }

    .categories {
      display: grid;
      gap: 12px;
    }

    .category-button {
      width: 100%;
      border: 1px solid var(--border);
      background: var(--surface);
      color: var(--text);
      border-radius: var(--radius-md);
      padding: 18px;
      text-align: left;
      display: grid;
      gap: 8px;
      cursor: pointer;
      transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    }

    .category-button:hover,
    .choice:hover,
    .ghost-button:hover,
    .toolbar-button:hover {
      transform: translateY(-1px);
    }

    .category-button.active {
      background: linear-gradient(135deg, rgba(239, 49, 36, 0.14), rgba(239, 49, 36, 0.02));
      border-color: rgba(239, 49, 36, 0.32);
      box-shadow: 0 14px 30px rgba(239, 49, 36, 0.1);
    }

    .category-button strong {
      font-size: 16px;
      font-weight: 700;
    }

    .category-button span {
      color: var(--muted);
      font-size: 13px;
    }

    .ghost-button,
    .toolbar-button {
      appearance: none;
      border: 0;
      border-radius: 999px;
      padding: 12px 18px;
      cursor: pointer;
      transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
    }

    .ghost-button {
      background: rgba(255, 255, 255, 0.16);
      color: white;
      width: fit-content;
      text-decoration: none;
    }

    .toolbar-button {
      background: var(--surface-alt);
      color: var(--text);
      text-decoration: none;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }

    .toolbar-button.primary {
      background: var(--accent);
      color: white;
    }

    .main {
      display: grid;
      gap: 24px;
      align-content: start;
    }

    .content-head {
      padding: 18px 22px;
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 14px;
      align-self: start;
    }

    .content-head p {
      color: var(--muted);
      max-width: 620px;
      font-size: 14px;
      line-height: 1.45;
    }

    .toolbar {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      justify-content: flex-end;
    }

    .status-banner {
      padding: 16px 20px;
      border-radius: var(--radius-md);
      background: linear-gradient(135deg, rgba(239, 49, 36, 0.1), rgba(255, 255, 255, 0.8));
      border: 1px solid rgba(239, 49, 36, 0.12);
      display: none;
      align-items: center;
      gap: 12px;
      color: var(--muted);
    }

    .status-banner.visible {
      display: flex;
    }

    .layout-main {
      display: grid;
      grid-template-columns: 1fr;
      gap: 24px;
      align-items: start;
    }

    .columns-grid {
      display: grid;
      gap: 18px;
      grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }

    .column-card,
    .result-card,
    .loading-card {
      padding: 22px;
      border-radius: var(--radius-lg);
      background: var(--surface);
      border: 1px solid var(--border);
      box-shadow: var(--shadow);
      min-width: 0;
    }

    .column-card {
      display: grid;
      gap: 16px;
      min-height: 220px;
      align-content: start;
    }

    .column-meta {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }

    .choices {
      display: grid;
      gap: 12px;
      min-height: 0;
    }

    .column-search {
      width: 100%;
      border: 1px solid rgba(23, 23, 23, 0.08);
      background: linear-gradient(180deg, #fafafb, #f2f3f6);
      color: var(--text);
      border-radius: 14px;
      padding: 12px 14px;
      outline: none;
      transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

    .column-search:focus {
      border-color: rgba(239, 49, 36, 0.28);
      box-shadow: 0 0 0 4px rgba(239, 49, 36, 0.1);
    }

    .choice-scroll {
      max-height: 280px;
      overflow-y: auto;
      padding: 6px 10px 18px 4px;
      margin: -6px -10px -18px -4px;
      scrollbar-gutter: stable;
    }

    .choice-list {
      display: grid;
      gap: 8px;
    }

    .choice {
      appearance: none;
      border: 1px solid var(--border);
      background: var(--surface-alt);
      color: var(--text);
      border-radius: 14px;
      padding: 12px 16px;
      cursor: pointer;
      transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
      width: 100%;
      min-width: 0;
      text-align: left;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      position: relative;
    }

    .choice-label {
      min-width: 0;
      overflow-wrap: anywhere;
    }

    .choice-marker {
      flex: none;
      width: 10px;
      height: 10px;
      border-radius: 999px;
      background: rgba(23, 23, 23, 0.14);
    }

    .choice.active {
      background: linear-gradient(135deg, var(--accent), var(--accent-dark));
      color: white;
      border-color: transparent;
      box-shadow: 0 10px 18px rgba(239, 49, 36, 0.24);
      z-index: 1;
    }

    .choice.active .choice-marker {
      background: white;
    }

    .muted-note {
      color: var(--muted);
      font-size: 14px;
      line-height: 1.45;
    }

    .result-card {
      display: grid;
      gap: 18px;
      background:
        radial-gradient(circle at top right, rgba(239, 49, 36, 0.08), transparent 34%),
        var(--surface);
    }

    .result-header {
      display: grid;
      gap: 8px;
    }

    .result-header p {
      margin: 0;
      color: var(--muted);
    }

    .result-body {
      display: grid;
      gap: 14px;
    }

    .formatted-text {
      display: grid;
      gap: 12px;
      min-width: 0;
      color: inherit;
      line-height: inherit;
    }

    .formatted-text > * {
      margin: 0;
      min-width: 0;
      overflow-wrap: anywhere;
      word-break: break-word;
    }

    .formatted-text ul {
      padding-left: 20px;
      display: grid;
      gap: 8px;
    }

    .formatted-text li {
      color: inherit;
      line-height: inherit;
    }

    .formatted-text a {
      color: var(--accent);
      text-decoration: underline;
      text-underline-offset: 2px;
    }

    .formatted-text strong,
    .formatted-text em {
      color: inherit;
    }

    .result-list {
      display: grid;
      gap: 12px;
    }

    .result-item {
      padding: 16px;
      border-radius: 16px;
      background: linear-gradient(180deg, var(--surface-alt), rgba(255, 255, 255, 0.98));
      border: 1px solid rgba(23, 23, 23, 0.05);
      display: grid;
      gap: 10px;
    }

    .result-item h4 {
      margin: 0;
      font-size: 18px;
      line-height: 1.25;
      overflow-wrap: anywhere;
      word-break: break-word;
    }

    .result-item p {
      margin: 0;
      color: var(--muted);
      line-height: 1.5;
      font-size: 14px;
      overflow-wrap: anywhere;
      word-break: break-word;
    }

    .result-title {
      font-size: 28px;
      line-height: 1.1;
      font-weight: 800;
      margin: 0;
      overflow-wrap: anywhere;
      word-break: break-word;
    }

    .result-text {
      margin: 0;
      color: var(--muted);
      line-height: 1.6;
      overflow-wrap: anywhere;
      word-break: break-word;
    }

    .result-body .formatted-text,
    .result-item .formatted-text {
      color: var(--muted);
      line-height: 1.6;
    }

    .result-item .formatted-text {
      font-size: 14px;
      line-height: 1.5;
    }

    .callout-block {
      padding: 14px 16px 14px 52px;
      border-radius: 18px;
      background: linear-gradient(180deg, rgba(239, 49, 36, 0.08), rgba(255, 255, 255, 0.96));
      border: 1px solid rgba(239, 49, 36, 0.16);
      min-width: 0;
    }

    .callout-block > * {
      margin: 0;
    }

    .aligned-block {
      min-width: 0;
    }

    .aligned-block.align-left {
      text-align: left;
    }

    .aligned-block.align-center {
      text-align: center;
    }

    .aligned-block.align-right {
      text-align: right;
    }

    .disclosure-block {
      padding: 2px 0;
      border-radius: 18px;
      border: 1px solid rgba(23, 23, 23, 0.08);
      background: linear-gradient(180deg, rgba(240, 241, 244, 0.9), rgba(255, 255, 255, 0.98));
      overflow: hidden;
    }

    .disclosure-block summary {
      list-style: none;
      cursor: pointer;
      padding: 14px 16px 14px 52px;
      font-weight: 700;
      color: var(--text);
      display: block;
      position: relative;
      overflow-wrap: anywhere;
      word-break: break-word;
    }

    .disclosure-block summary::-webkit-details-marker {
      display: none;
    }

    .disclosure-block summary::before {
      content: "";
      position: absolute;
      left: 16px;
      top: 50%;
      transform: translateY(-50%);
      width: 22px;
      height: 22px;
      border-radius: 999px;
      background:
        linear-gradient(var(--accent), var(--accent)) center / 10px 2px no-repeat,
        linear-gradient(var(--accent), var(--accent)) center / 2px 10px no-repeat,
        rgba(239, 49, 36, 0.1);
      box-shadow: inset 0 0 0 1px rgba(239, 49, 36, 0.08);
    }

    .disclosure-block[open] summary::before {
      content: "−";
    }

    .disclosure-content {
      padding: 0 16px 16px;
      border-top: 1px solid rgba(23, 23, 23, 0.06);
      overflow-wrap: anywhere;
      word-break: break-word;
    }

    .disclosure-block[open] summary::before {
      content: "";
      background:
        linear-gradient(var(--accent), var(--accent)) center / 10px 2px no-repeat,
        rgba(239, 49, 36, 0.1);
    }

    .task-list {
      display: grid;
      gap: 10px;
    }

    .task-item {
      display: grid;
      grid-template-columns: 18px minmax(0, 1fr);
      gap: 12px;
      align-items: start;
      padding: 12px 14px;
      border-radius: 14px;
      background: var(--surface-alt);
      border: 1px solid rgba(23, 23, 23, 0.05);
      min-width: 0;
    }

    .task-item.done {
      background: rgba(239, 49, 36, 0.08);
      border-color: rgba(239, 49, 36, 0.18);
    }

    .task-item input[type="checkbox"] {
      width: 18px;
      height: 18px;
      margin: 2px 0 0;
      accent-color: var(--accent);
      cursor: pointer;
    }

    .task-text {
      min-width: 0;
      color: inherit;
      line-height: inherit;
      overflow-wrap: anywhere;
      word-break: break-word;
    }

    .task-item.done .task-text {
      color: var(--text);
      text-decoration: line-through;
      text-decoration-thickness: 1.5px;
      text-decoration-color: rgba(239, 49, 36, 0.6);
    }

    .result-empty {
      padding: 22px;
      border-radius: var(--radius-md);
      background: linear-gradient(180deg, var(--surface-alt), rgba(255, 255, 255, 0.96));
      color: var(--muted);
      line-height: 1.55;
      overflow-wrap: anywhere;
      word-break: break-word;
    }

    .loading-card {
      max-width: 720px;
      margin: 24px auto;
      text-align: center;
    }

    .skeleton {
      height: 12px;
      border-radius: 999px;
      background: linear-gradient(90deg, rgba(23, 23, 23, 0.06), rgba(23, 23, 23, 0.13), rgba(23, 23, 23, 0.06));
      background-size: 200% 100%;
      animation: pulse 1.4s linear infinite;
    }

    @keyframes pulse {
      0% { background-position: 200% 0; }
      100% { background-position: -200% 0; }
    }

    @media (max-width: 1100px) {
      .app-shell,
      .layout-main {
        grid-template-columns: 1fr;
      }
    }

    @media (max-width: 760px) {
      .app-shell {
        padding: 14px;
        gap: 16px;
      }

      .sidebar,
      .content-head,
      .column-card,
      .result-card {
        padding: 18px;
      }

      .categories {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
      }

      .content-head {
        flex-direction: column;
        align-items: flex-start;
      }

      .toolbar {
        width: 100%;
        justify-content: flex-start;
      }

      .columns-grid {
        grid-template-columns: 1fr;
      }
    }
