
    :root {
      --primary: #0284c7;          /* Sky Blue 600 */
      --primary-dark: #0369a1;     /* Sky Blue 700 */
      --primary-deep: #075985;     /* Navy-Sky 800 */
      --primary-light: #e0f2fe;    /* Sky 100 */
      --primary-subtle: #f0f9ff;   /* Sky 50 */
      --accent: #2563eb;           /* Royal Blue */
      --accent-soft: #eff6ff;
      --navy: #0f172a;             /* Slate 900 */
      --ink: #1e293b;              /* Slate 800 */
      --ink-muted: #64748b;        /* Slate 500 */
      --ink-light: #94a3b8;        /* Slate 400 */
      --line: #e2e8f0;             /* Slate 200 */
      --line-subtle: #f1f5f9;      /* Slate 100 */
      --paper: #ffffff;
      --bg: #f8fafc;               /* Modern cool slate-white */
      --card-bg: #ffffff;
      --success: #10b981;
      --success-bg: #ecfdf5;
      --warning: #f59e0b;
      --warning-bg: #fffbeb;
      --danger: #ef4444;
      --danger-bg: #fef2f2;
      --radius-sm: 8px;
      --radius-md: 12px;
      --radius-lg: 16px;
      --radius-xl: 20px;
      --radius-full: 9999px;
      --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
      --shadow-card: 0 4px 16px -2px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.03);
      --shadow-hover: 0 12px 28px -4px rgba(2, 132, 199, 0.12), 0 4px 8px -2px rgba(15, 23, 42, 0.04);
      --shadow-hero: 0 20px 40px -12px rgba(2, 132, 199, 0.18);
    }

    * { box-sizing: border-box; margin: 0; padding: 0; }
    html { scroll-behavior: smooth; }
    body {
      background: var(--bg);
      color: var(--ink);
      font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
      font-size: 15.5px;
      line-height: 1.6;
      -webkit-font-smoothing: antialiased;
    }
    button, input, select, textarea { font-family: inherit; }
    button { cursor: pointer; border: none; background: none; }
    a { color: inherit; text-decoration: none; }
    :focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

    .wrap {
      max-width: 1220px;
      margin: 0 auto;
      padding: 0 20px;
    }

    /* Top utility bar */
    .topbar {
      background: #0f2744;
      color: #93c5fd;
      font-size: 13px;
      border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    .topbar .wrap {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding-top: 7px;
      padding-bottom: 7px;
    }
    .topbar-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      color: #e0f2fe;
    }
    .topbar-badge::before {
      content: "";
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: #38bdf8;
      box-shadow: 0 0 8px #38bdf8;
    }
    .topbar-social {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    /* Site Header */
    .sitehead {
      background: #ffffff;
      position: sticky;
      top: 0;
      z-index: 100;
      border-bottom: 1px solid var(--line);
      box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.03);
    }
    .headinner {
      height: 78px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 24px;
    }
    .brand {
      display: flex;
      align-items: center;
      gap: 13px;
      text-decoration: none;
    }
    .brandmark {
      width: 44px;
      height: 44px;
      border-radius: var(--radius-md);
      background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 800;
      font-size: 24px;
      box-shadow: 0 4px 12px rgba(2, 132, 199, 0.28);
      position: relative;
      overflow: hidden;
    }
    .brandmark::after {
      content: "";
      position: absolute;
      top: 0; left: 0; right: 0; height: 50%;
      background: linear-gradient(to bottom, rgba(255,255,255,0.25), transparent);
    }
    .brand-text {
      display: flex;
      flex-direction: column;
    }
    .brand-title {
      font-size: 21px;
      font-weight: 800;
      color: #0c4a6e;
      letter-spacing: -0.01em;
      line-height: 1.2;
    }
    .brand-tag {
      font-size: 12px;
      font-weight: 500;
      color: var(--ink-muted);
      letter-spacing: 0.02em;
    }

    /* Primary Nav Bar */
    .nav {
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .nav a {
      font-size: 15px;
      font-weight: 600;
      padding: 9px 15px;
      border-radius: var(--radius-sm);
      color: #334155;
      transition: all 0.18s ease;
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }
    .nav a:hover {
      background: var(--primary-light);
      color: var(--primary-dark);
    }
    .nav a.active {
      background: #0284c7;
      color: #ffffff;
      box-shadow: 0 3px 10px rgba(2, 132, 199, 0.25);
    }
    .nav .adminlink {
      background: #f0f9ff;
      border: 1px solid #bae6fd;
      color: #0369a1;
      margin-left: 8px;
    }
    .nav .adminlink:hover {
      background: #e0f2fe;
      border-color: #7dd3fc;
      color: #0284c7;
    }

    .mobilemenu {
      display: none;
      padding: 9px 15px;
      border-radius: var(--radius-sm);
      border: 1px solid var(--line);
      background: #ffffff;
      font-size: 15px;
      font-weight: 600;
      color: var(--ink);
    }

    /* Hero Section - Modern Thai Portal Gradient */
    .hero {
      background: linear-gradient(135deg, #042f4c 0%, #075985 45%, #0284c7 90%, #38bdf8 100%);
      color: #ffffff;
      position: relative;
      overflow: hidden;
      padding: 56px 0 60px;
    }
    .hero::before {
      content: "";
      position: absolute;
      top: -120px;
      right: -100px;
      width: 520px;
      height: 520px;
      border-radius: 50%;
      background: radial-gradient(circle, rgba(56, 189, 248, 0.35) 0%, rgba(2, 132, 199, 0) 70%);
      pointer-events: none;
    }
    .hero::after {
      content: "";
      position: absolute;
      bottom: -60px;
      left: 10%;
      width: 380px;
      height: 380px;
      border-radius: 50%;
      background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
      pointer-events: none;
    }
    .hero-content {
      position: relative;
      z-index: 2;
      max-width: 820px;
    }
    .hero-eyebrow {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      background: rgba(255, 255, 255, 0.15);
      backdrop-filter: blur(8px);
      border: 1px solid rgba(255, 255, 255, 0.25);
      color: #e0f2fe;
      padding: 6px 14px;
      border-radius: var(--radius-full);
      font-size: 13.5px;
      font-weight: 600;
      margin-bottom: 18px;
    }
    .hero h1 {
      font-size: clamp(32px, 4.2vw, 48px);
      font-weight: 800;
      line-height: 1.25;
      letter-spacing: -0.02em;
      margin-bottom: 14px;
      text-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    }
    .hero p {
      font-size: 17.5px;
      color: #e0f2fe;
      max-width: 650px;
      margin-bottom: 28px;
      line-height: 1.6;
      font-weight: 400;
    }

    /* Modern Hero Search Bar */
    .searchbar-card {
      background: #ffffff;
      padding: 7px 8px 7px 18px;
      border-radius: var(--radius-xl);
      box-shadow: 0 16px 36px -4px rgba(7, 43, 72, 0.35);
      display: flex;
      align-items: center;
      gap: 12px;
      max-width: 760px;
      border: 2px solid rgba(255, 255, 255, 0.8);
      transition: all 0.2s ease;
    }
    .searchbar-card:focus-within {
      box-shadow: 0 20px 42px -4px rgba(7, 43, 72, 0.45);
      border-color: #38bdf8;
    }
    .searchbar-icon {
      color: #0284c7;
      font-size: 20px;
      display: flex;
      align-items: center;
    }
    .searchbar-card input {
      flex: 1;
      border: none;
      outline: none;
      font-size: 16px;
      color: var(--ink);
      padding: 10px 4px;
      background: transparent;
    }
    .searchbar-card input::placeholder {
      color: #94a3b8;
    }
    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      font-size: 15px;
      font-weight: 700;
      padding: 11px 22px;
      border-radius: var(--radius-md);
      transition: all 0.2s ease;
      cursor: pointer;
      text-decoration: none;
      white-space: nowrap;
    }
    .btn-primary {
      background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
      color: #ffffff;
      box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
    }
    .btn-primary:hover {
      background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
      box-shadow: 0 6px 16px rgba(2, 132, 199, 0.4);
      transform: translateY(-1px);
    }
    .btn-light {
      background: #ffffff;
      color: var(--primary-deep);
      border: 1px solid var(--line);
    }
    .btn-light:hover {
      background: var(--primary-subtle);
      border-color: #bae6fd;
    }
    .btn-sm {
      padding: 7px 14px;
      font-size: 13.5px;
      border-radius: var(--radius-sm);
    }

    .hero-tags {
      margin-top: 14px;
      font-size: 13px;
      color: #bae6fd;
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }
    .hero-tags span { opacity: 0.9; }
    .hero-tag-link {
      background: rgba(255, 255, 255, 0.12);
      color: #ffffff;
      padding: 2px 10px;
      border-radius: var(--radius-full);
      font-size: 12.5px;
      transition: background 0.15s ease;
    }
    .hero-tag-link:hover {
      background: rgba(255, 255, 255, 0.25);
    }

    /* Page intro for subpages */
    .pageintro {
      background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 100%);
      border-bottom: 1px solid var(--line);
      padding: 28px 0;
    }
    .breadcrumb {
      font-size: 13.5px;
      color: var(--ink-muted);
      margin-bottom: 8px;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .breadcrumb a {
      color: var(--primary);
      font-weight: 500;
    }
    .breadcrumb a:hover {
      text-decoration: underline;
    }
    .pageintro h1 {
      font-size: 30px;
      font-weight: 800;
      color: #0c4a6e;
      line-height: 1.3;
    }
    .pageintro p {
      color: var(--ink-muted);
      font-size: 15px;
      margin-top: 4px;
    }

    /* Category bar */
    .categorytop {
      background: #ffffff;
      border-bottom: 1px solid var(--line);
      position: sticky;
      top: 78px;
      z-index: 90;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    }
    .categorytop .wrap {
      padding-top: 12px;
      padding-bottom: 12px;
    }
    .chips {
      display: flex;
      gap: 8px;
      overflow-x: auto;
      padding-bottom: 2px;
      scrollbar-width: none;
    }
    .chips::-webkit-scrollbar { display: none; }
    .chip {
      background: #f1f5f9;
      border: 1px solid #e2e8f0;
      border-radius: var(--radius-full);
      color: #475569;
      font-size: 14px;
      font-weight: 600;
      padding: 6px 15px;
      white-space: nowrap;
      transition: all 0.16s ease;
    }
    .chip:hover {
      background: var(--primary-light);
      border-color: #bae6fd;
      color: var(--primary-deep);
    }
    .chip.active {
      background: #0284c7;
      border-color: #0284c7;
      color: #ffffff;
      box-shadow: 0 2px 8px rgba(2, 132, 199, 0.28);
    }
    .subcatbar {
      display: flex;
      gap: 8px;
      align-items: center;
      flex-wrap: wrap;
      margin-top: 10px;
      padding-top: 10px;
      border-top: 1px dashed var(--line);
    }
    .subcatbar strong {
      font-size: 13px;
      color: #0369a1;
      font-weight: 700;
    }

    /* Main Content Layout */
    .main {
      padding: 32px 20px 64px;
    }
    .portal-grid {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 340px;
      gap: 28px;
      align-items: start;
    }

    /* Section Headers */
    .sectionhead {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 20px;
      padding-bottom: 12px;
      border-bottom: 2px solid #e0f2fe;
      position: relative;
    }
    .sectionhead::after {
      content: "";
      position: absolute;
      bottom: -2px;
      left: 0;
      width: 70px;
      height: 2px;
      background: #0284c7;
      border-radius: var(--radius-full);
    }
    .sectionhead h2 {
      font-size: 23px;
      font-weight: 800;
      color: #0f2744;
      line-height: 1.2;
    }
    .sectionhead p {
      font-size: 13.5px;
      color: var(--ink-muted);
      margin-top: 4px;
    }
    .more-link {
      color: #0284c7;
      font-size: 14px;
      font-weight: 700;
      white-space: nowrap;
      display: inline-flex;
      align-items: center;
      gap: 4px;
      transition: gap 0.15s ease;
    }
    .more-link:hover {
      color: #0369a1;
      gap: 7px;
    }

    /* Modern Card Layouts */
    .cards-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 20px;
      margin-bottom: 36px;
    }
    .card {
      background: var(--card-bg);
      border: 1px solid var(--line);
      border-radius: var(--radius-md);
      padding: 20px;
      box-shadow: var(--shadow-card);
      display: flex;
      flex-direction: column;
      position: relative;
      transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .card:hover {
      transform: translateY(-4px);
      box-shadow: var(--shadow-hover);
      border-color: #bae6fd;
    }
    .card-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 12px;
    }
    .card h3 {
      font-size: 17.5px;
      font-weight: 700;
      line-height: 1.45;
      color: #0f172a;
      margin-bottom: 8px;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }
    .card:hover h3 {
      color: #0284c7;
    }
    .card-desc {
      font-size: 13.8px;
      color: var(--ink-muted);
      line-height: 1.5;
      margin-bottom: 18px;
      flex: 1;
    }
    .card-footer {
      margin-top: auto;
      padding-top: 14px;
      border-top: 1px solid var(--line-subtle);
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 12.5px;
      color: var(--ink-muted);
    }
    .card-footer b {
      color: #0284c7;
      font-weight: 700;
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }

    /* Badges */
    .badge {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-size: 12px;
      font-weight: 700;
      padding: 3px 10px;
      border-radius: var(--radius-full);
      line-height: 1.4;
      white-space: nowrap;
    }
    .badge.green {
      background: var(--success-bg);
      color: #059669;
      border: 1px solid #a7f3d0;
    }
    .badge.amber {
      background: var(--warning-bg);
      color: #d97706;
      border: 1px solid #fde68a;
    }
    .badge.red {
      background: var(--danger-bg);
      color: #dc2626;
      border: 1px solid #fecaca;
    }
    .badge.blue {
      background: var(--primary-subtle);
      color: #0284c7;
      border: 1px solid #bae6fd;
    }

    /* Agency Logo System */
    .agencylogo {
      width: 44px;
      height: 44px;
      flex: 0 0 44px;
      border-radius: var(--radius-md);
      background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
      border: 1px solid #bae6fd;
      color: #0284c7;
      display: grid;
      place-items: center;
      font-weight: 800;
      font-size: 18px;
      box-shadow: inset 0 1px 2px rgba(255,255,255,0.8);
      overflow: hidden;
    }
    .agencylogo.large {
      width: 60px;
      height: 60px;
      flex-basis: 60px;
      font-size: 24px;
      border-radius: var(--radius-lg);
    }
    .agencylogo.mini {
      width: 32px;
      height: 32px;
      flex-basis: 32px;
      font-size: 13px;
      border-radius: var(--radius-sm);
    }
    .agencylogo img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      background: #ffffff;
    }

    /* Story Cover Visuals */
    .storycover {
      width: 100%;
      aspect-ratio: 16/9;
      border-radius: var(--radius-md);
      background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 50%, #7dd3fc 100%);
      display: flex;
      align-items: center;
      justify-content: center;
      color: #0369a1;
      font-weight: 700;
      font-size: 15px;
      position: relative;
      overflow: hidden;
      margin-bottom: 14px;
      border: 1px solid #bae6fd;
    }
    .storycover.learn {
      background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
      border-color: #bfdbfe;
      color: #1d4ed8;
    }
    .storycover img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
    .storycover.large {
      aspect-ratio: 21/9;
      font-size: 20px;
      margin: 18px 0 24px;
    }
    .coverhint {
      text-align: center;
      padding: 12px;
    }
    .coverhint small {
      display: block;
      font-size: 12px;
      opacity: 0.8;
      font-weight: 500;
    }

    /* Featured / Recommended block with Slider */
    .featuredblock {
      background: #ffffff;
      border: 1px solid #bae6fd;
      border-radius: var(--radius-lg);
      padding: 24px;
      margin: 0 0 32px;
      box-shadow: 0 10px 30px -4px rgba(2, 132, 199, 0.08);
      position: relative;
      overflow: hidden;
    }
    .featuredblock::before {
      content: "";
      position: absolute;
      top: 0; left: 0; right: 0; height: 4px;
      background: linear-gradient(90deg, #0284c7, #38bdf8, #2563eb);
    }
    .featuredblock h2 {
      font-size: 21px;
      font-weight: 800;
      color: #0f172a;
      margin-bottom: 16px;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .slidebody {
      display: grid;
      grid-template-columns: 1.3fr 1fr;
      gap: 24px;
      align-items: center;
    }
    .slidebody h3 {
      font-size: 22px;
      font-weight: 800;
      line-height: 1.35;
      color: #0f172a;
      margin: 10px 0;
    }
    .slidebody h3 a:hover {
      color: #0284c7;
    }
    .slidebody p {
      color: var(--ink-muted);
      font-size: 14.5px;
      line-height: 1.6;
      margin-bottom: 16px;
    }
    .slidecontrols {
      display: flex;
      gap: 8px;
      align-items: center;
      justify-content: flex-end;
      margin-top: 14px;
      padding-top: 12px;
      border-top: 1px solid var(--line-subtle);
    }
    .slidecontrols button {
      background: #ffffff;
      border: 1px solid var(--line);
      color: var(--ink);
      border-radius: var(--radius-full);
      width: 32px;
      height: 32px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 700;
      transition: all 0.15s ease;
    }
    .slidecontrols button:hover {
      border-color: #0284c7;
      color: #0284c7;
      background: var(--primary-subtle);
    }
    .slidecontrols .dot {
      width: 10px;
      height: 10px;
      border-radius: var(--radius-full);
      background: #cbd5e1;
      padding: 0;
      border: none;
    }
    .slidecontrols .dot.active {
      background: #0284c7;
      width: 24px;
      border-radius: var(--radius-full);
    }

    /* List view style */
    .list {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 16px;
      margin-bottom: 32px;
    }
    .listitem {
      background: #ffffff;
      border: 1px solid var(--line);
      border-radius: var(--radius-md);
      padding: 18px 20px;
      box-shadow: var(--shadow-card);
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      gap: 14px;
      transition: all 0.2s ease;
    }
    .listitem:hover {
      border-color: #bae6fd;
      transform: translateY(-2px);
      box-shadow: var(--shadow-hover);
    }
    .listitem .agencyline {
      display: flex;
      gap: 14px;
      align-items: flex-start;
    }
    .listitem h3 {
      font-size: 17px;
      font-weight: 700;
      color: #0f172a;
      line-height: 1.4;
      margin: 6px 0 4px;
    }
    .listitem p {
      font-size: 13.5px;
      color: var(--ink-muted);
      line-height: 1.5;
    }
    .listitem .aside {
      display: flex;
      align-items: center;
      justify-content: space-between;
      border-top: 1px solid var(--line-subtle);
      padding-top: 10px;
      font-size: 12.5px;
      color: var(--ink-muted);
    }

    /* Sidebar Panels */
    .sidepanel {
      background: #ffffff;
      border: 1px solid var(--line);
      border-radius: var(--radius-md);
      padding: 20px;
      box-shadow: var(--shadow-card);
      margin-bottom: 22px;
    }
    .sidepanel-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      border-bottom: 2px solid #e0f2fe;
      padding-bottom: 10px;
      margin-bottom: 14px;
      position: relative;
    }
    .sidepanel-header::after {
      content: "";
      position: absolute;
      bottom: -2px;
      left: 0;
      width: 45px;
      height: 2px;
      background: #0284c7;
    }
    .sidepanel-header h3 {
      font-size: 18px;
      font-weight: 800;
      color: #0f172a;
    }
    .sidepanel-list a {
      display: block;
      padding: 11px 0;
      border-bottom: 1px solid var(--line-subtle);
      font-size: 14px;
      line-height: 1.45;
      color: #1e293b;
      transition: color 0.15s ease;
    }
    .sidepanel-list a:last-child { border-bottom: none; }
    .sidepanel-list a:hover {
      color: #0284c7;
    }
    .sidepanel-list small {
      display: block;
      color: var(--ink-muted);
      font-size: 12px;
      margin-top: 3px;
    }

    /* Ad slots */
    .adslot {
      border: 1px dashed #7dd3fc;
      background: #f0f9ff;
      border-radius: var(--radius-md);
      padding: 16px;
      text-align: center;
      color: #0369a1;
      margin: 24px 0;
      font-size: 13.5px;
      transition: all 0.2s ease;
    }
    .adslot.active {
      border-style: solid;
      background: #ffffff;
      padding: 0;
      overflow: hidden;
      border-color: var(--line);
      box-shadow: var(--shadow-sm);
      width: fit-content;
      max-width: 100%;
      margin-left: auto;
      margin-right: auto;
    }
    .adlabel {
      display: block;
      background: #f1f5f9;
      color: #64748b;
      text-align: right;
      font-size: 10.5px;
      font-weight: 600;
      padding: 3px 12px;
      letter-spacing: 0.05em;
    }
    .adslot.active img {
      width: auto;
      max-width: 100%;
      height: auto;
      display: block;
    }
    .adslot.active b {
      display: block;
      padding: 16px;
      color: #0f172a;
      font-size: 16px;
    }

    /* Sorting and filter bar */
    .filters {
      background: #ffffff;
      border: 1px solid var(--line);
      border-radius: var(--radius-md);
      padding: 18px 20px;
      margin-bottom: 24px;
      box-shadow: var(--shadow-card);
    }
    .filterrow {
      display: flex;
      gap: 12px;
      align-items: center;
      flex-wrap: wrap;
    }
    .filterrow input, .filterrow select, .field input, .field select, .field textarea {
      border: 1px solid #cbd5e1;
      border-radius: var(--radius-sm);
      background: #ffffff;
      padding: 9px 13px;
      color: var(--ink);
      font-size: 14.5px;
      transition: border 0.15s ease;
    }
    .filterrow input:focus, .filterrow select:focus, .field input:focus, .field select:focus, .field textarea:focus {
      border-color: #0284c7;
      outline: none;
      box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
    }
    .filterrow input { flex: 1; min-width: 220px; }
    .filterrow select { min-width: 170px; }

    .sortrow {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin: 16px 0 20px;
      font-size: 13.5px;
      color: var(--ink-muted);
    }
    .sortrow select {
      border: 1px solid var(--line);
      border-radius: var(--radius-sm);
      background: #ffffff;
      padding: 6px 12px;
      font-size: 13.5px;
      color: var(--ink);
      margin-left: 6px;
    }

    /* Quick Action Feature Boxes */
    .quick-features {
      display: grid;
      grid-template-columns: 1.4fr 1fr;
      gap: 20px;
      margin-bottom: 36px;
    }
    .feature-banner {
      background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
      border: 1px solid #bae6fd;
      border-radius: var(--radius-lg);
      padding: 26px 30px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      position: relative;
      overflow: hidden;
    }
    .feature-banner h3 {
      font-size: 23px;
      font-weight: 800;
      color: #0c4a6e;
      margin: 8px 0 6px;
    }
    .feature-banner p {
      color: #0369a1;
      font-size: 15px;
      max-width: 480px;
      margin-bottom: 18px;
    }
    .notice-card {
      background: #ffffff;
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      padding: 24px;
      box-shadow: var(--shadow-card);
      display: flex;
      flex-direction: column;
      justify-content: center;
    }
    .notice-card h3 {
      font-size: 18px;
      font-weight: 700;
      color: #0f172a;
      margin-bottom: 8px;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .notice-card p {
      font-size: 14px;
      color: var(--ink-muted);
      line-height: 1.55;
      margin-bottom: 14px;
    }

    /* Article & Detail View */
    .detailgrid {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 320px;
      gap: 28px;
      align-items: start;
      margin-top: 24px;
    }
    .article {
      background: #ffffff;
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      padding: 36px 40px;
      box-shadow: var(--shadow-card);
    }
    .article h1 {
      font-size: 32px;
      font-weight: 800;
      color: #0f172a;
      line-height: 1.35;
      margin: 14px 0 16px;
    }
    .article .meta {
      font-size: 14px;
      color: var(--ink-muted);
      padding-bottom: 20px;
      border-bottom: 1px solid var(--line);
      margin-bottom: 24px;
    }
    .article .lead {
      font-size: 17.5px;
      font-weight: 500;
      color: #334155;
      line-height: 1.7;
      margin-bottom: 24px;
      background: #f8fafc;
      padding: 16px 20px;
      border-left: 4px solid #0284c7;
      border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    }
    .article h2 {
      font-size: 22px;
      font-weight: 700;
      color: #0c4a6e;
      margin: 28px 0 14px;
      padding-bottom: 8px;
      border-bottom: 1px solid var(--line-subtle);
    }
    .article p, .article li {
      font-size: 16px;
      line-height: 1.8;
      color: #334155;
      margin-bottom: 12px;
    }
    .article ul {
      padding-left: 24px;
      margin-bottom: 20px;
    }
    .facts {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 14px;
      margin: 24px 0 28px;
    }
    .fact {
      background: #f0f9ff;
      border: 1px solid #bae6fd;
      border-radius: var(--radius-md);
      padding: 14px 18px;
    }
    .fact small {
      display: block;
      color: #0369a1;
      font-size: 12.5px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.04em;
    }
    .fact b {
      color: #0f172a;
      font-size: 16px;
      margin-top: 4px;
      display: block;
    }
    .file-attachment {
      border: 1px solid #bae6fd;
      border-radius: var(--radius-md);
      background: #f0f9ff;
      padding: 14px 18px;
      margin: 10px 0;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
    }
    .file-attachment span {
      font-size: 14.5px;
      font-weight: 600;
      color: #0369a1;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .articleupdated {
      border-top: 1px solid var(--line);
      padding-top: 18px;
      margin-top: 32px;
      text-align: right;
      font-size: 13px;
      color: var(--ink-light);
    }

    /* Admin Backend Layout */
    .adminlayout {
      display: grid;
      grid-template-columns: 240px minmax(0, 1fr);
      min-height: 640px;
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      overflow: hidden;
      background: #ffffff;
      box-shadow: var(--shadow-card);
      margin-top: 24px;
    }
    .sidebar {
      background: #092644;
      color: #ffffff;
      padding: 24px 14px;
      display: flex;
      flex-direction: column;
      gap: 4px;
    }
    .sidebar strong {
      display: block;
      padding: 0 12px 18px;
      font-size: 15px;
      color: #93c5fd;
      letter-spacing: 0.02em;
    }
    .sidebar button {
      display: block;
      width: 100%;
      background: transparent;
      color: #cbd5e1;
      border: 0;
      text-align: left;
      padding: 11px 14px;
      border-radius: var(--radius-sm);
      font-size: 14.5px;
      font-weight: 500;
      transition: all 0.16s ease;
    }
    .sidebar button:hover, .sidebar button.selected {
      background: #0284c7;
      color: #ffffff;
    }
    .adminbody {
      padding: 32px;
      min-width: 0;
      background: #ffffff;
    }
    .admintop {
      display: flex;
      justify-content: space-between;
      gap: 16px;
      align-items: center;
      margin-bottom: 24px;
      padding-bottom: 16px;
      border-bottom: 1px solid var(--line);
    }
    .admintop h1 {
      font-size: 24px;
      font-weight: 800;
      color: #0f172a;
    }
    .stats {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 16px;
      margin-bottom: 28px;
    }
    .stat {
      background: #f8fafc;
      border: 1px solid var(--line);
      border-radius: var(--radius-md);
      padding: 16px 20px;
      transition: all 0.2s ease;
    }
    .stat:hover {
      border-color: #bae6fd;
      background: #f0f9ff;
    }
    .stat small {
      color: var(--ink-muted);
      font-size: 13px;
      font-weight: 600;
    }
    .stat b {
      display: block;
      color: #0284c7;
      font-size: 28px;
      font-weight: 800;
      margin-top: 4px;
    }
    .tablewrap {
      overflow-x: auto;
      border: 1px solid var(--line);
      border-radius: var(--radius-md);
    }
    table {
      border-collapse: collapse;
      width: 100%;
      min-width: 620px;
      font-size: 13.8px;
    }
    th {
      text-align: left;
      background: #f1f5f9;
      color: #475569;
      font-weight: 700;
    }
    td, th {
      padding: 13px 16px;
      border-bottom: 1px solid var(--line);
    }
    tr:last-child td { border: 0; }
    tr:hover td { background: #f8fafc; }
    .formbox {
      border: 1px solid var(--line);
      border-radius: var(--radius-md);
      padding: 24px;
      max-width: 760px;
      background: #fafafa;
    }
    .field {
      display: grid;
      gap: 6px;
      font-size: 14px;
      font-weight: 600;
      margin-bottom: 16px;
      color: #1e293b;
    }
    .field textarea {
      min-height: 110px;
      resize: vertical;
    }
    .field small {
      color: var(--ink-muted);
      font-weight: 400;
      font-size: 12.5px;
    }
    .formcols {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;
    }
    .adminpanel {
      border: 1px solid var(--line);
      border-radius: var(--radius-md);
      padding: 20px;
      margin: 18px 0;
      background: #ffffff;
    }
    .adminpanel h3 {
      font-size: 17px;
      font-weight: 700;
      color: #0f172a;
      margin-bottom: 14px;
    }
    .adminnote {
      font-size: 13px;
      color: var(--ink-muted);
      margin-top: 14px;
    }
    .agencyrow {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 12px 0;
      border-bottom: 1px solid var(--line-subtle);
    }
    .agencyrow:last-child { border: none; }
    .agencyactions {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
    }
    .agencyactions button {
      border: 1px solid var(--line);
      background: #ffffff;
      color: #334155;
      border-radius: var(--radius-sm);
      padding: 6px 11px;
      font-size: 12.5px;
      font-weight: 600;
      transition: all 0.15s ease;
    }
    .agencyactions button:hover:not(:disabled) {
      background: #f1f5f9;
      border-color: #cbd5e1;
    }
    .agencyactions button:disabled {
      opacity: 0.4;
      cursor: not-allowed;
    }
    .demoalert {
      margin: 20px 0;
      background: #fffbeb;
      color: #92400e;
      border: 1px solid #fde68a;
      border-radius: var(--radius-md);
      padding: 12px 18px;
      font-size: 13.5px;
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .demoalert::before {
      content: "ℹ";
      font-weight: bold;
      color: #d97706;
      font-size: 16px;
    }

    /* Social buttons */
    .socialbuttons {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      align-items: center;
    }
    .socialbtn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      border: 1px solid #bae6fd;
      background: #f0f9ff;
      color: #0369a1;
      border-radius: var(--radius-full);
      padding: 5px 12px;
      font-size: 12px;
      font-weight: 700;
      transition: all 0.16s ease;
    }
    .socialbtn:hover {
      background: #e0f2fe;
      border-color: #7dd3fc;
      transform: translateY(-1px);
    }
    .socialbtn.disabled {
      opacity: 0.6;
      cursor: default;
    }

    /* Footer */
    .footer {
      background: #091e36;
      color: #cbd5e1;
      padding: 48px 0 28px;
      border-top: 1px solid rgba(255, 255, 255, 0.08);
    }
    .footergrid {
      display: grid;
      grid-template-columns: 1.6fr 1fr;
      gap: 36px;
      margin-bottom: 36px;
    }
    .footer .brand-title { color: #ffffff; }
    .footer .brand-tag { color: #94a3b8; }
    .footer p {
      font-size: 14px;
      line-height: 1.65;
      color: #94a3b8;
      max-width: 520px;
      margin: 14px 0 18px;
    }
    .footer h4 {
      color: #ffffff;
      font-size: 16px;
      font-weight: 700;
      margin-bottom: 14px;
    }
    .footer a {
      color: #94a3b8;
      font-size: 14px;
      display: block;
      margin-bottom: 8px;
      transition: color 0.15s ease;
    }
    .footer a:hover {
      color: #38bdf8;
    }
    .footer-bottom {
      border-top: 1px solid rgba(255, 255, 255, 0.08);
      padding-top: 20px;
      font-size: 12.5px;
      color: #64748b;
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      gap: 12px;
    }

    .legal-page { padding-top: 26px; padding-bottom: 70px; }
    .legal-page .breadcrumb { margin-bottom: 18px; }
    .legal-panel { max-width: 850px; padding: clamp(24px, 5vw, 54px); background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
    .legal-kicker { color: var(--primary-dark); font-weight: 700; }
    .legal-panel h1 { font-size: clamp(26px, 4vw, 37px); color: var(--navy); margin: 4px 0 8px; }
    .legal-date { color: var(--ink-muted); font-size: 14px; margin-bottom: 26px; }
    .legal-panel h2 { font-size: 20px; color: var(--navy); margin: 26px 0 8px; }
    .legal-panel p { margin-bottom: 14px; line-height: 1.8; }
    .legal-panel a { color: var(--primary-dark); text-decoration: underline; overflow-wrap: anywhere; }
    .legal-related { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 28px; }

    .empty {
      padding: 48px 24px;
      text-align: center;
      background: #ffffff;
      border: 1px dashed #cbd5e1;
      border-radius: var(--radius-md);
      color: var(--ink-muted);
      font-size: 15px;
    }
    .hidden { display: none !important; }

    /* Responsive */
    @media (max-width: 980px) {
      .cards-grid { grid-template-columns: repeat(2, 1fr); }
      .portal-grid, .detailgrid, .quick-features, .slidebody, .adminlayout { grid-template-columns: 1fr; }
      .adminlayout { grid-template-columns: 1fr; }
      .sidebar { flex-direction: row; overflow-x: auto; padding: 12px; }
      .sidebar strong { display: none; }
      .sidebar button { white-space: nowrap; width: auto; }
      .stats { grid-template-columns: repeat(2, 1fr); }
      .footergrid { grid-template-columns: 1fr; }
    }
    @media (max-width: 768px) {
      .topbar { display: none; }
      .mobilemenu { display: block; }
      .nav {
        display: none;
        position: absolute;
        top: 78px;
        left: 0;
        right: 0;
        background: #ffffff;
        border-bottom: 1px solid var(--line);
        box-shadow: 0 12px 24px rgba(0,0,0,0.08);
        padding: 16px 20px;
        flex-direction: column;
        align-items: stretch;
      }
      .nav.open { display: flex; }
      .nav a { padding: 12px; }
      .nav .adminlink { margin-left: 0; }
      .cards-grid, .list { grid-template-columns: 1fr; }
      .hero { padding: 36px 0 44px; }
      .hero h1 { font-size: 28px; }
      .article { padding: 24px 20px; }
      .article h1 { font-size: 24px; }
      .facts, .formcols { grid-template-columns: 1fr; }
      .searchbar-card { flex-direction: column; padding: 12px; border-radius: var(--radius-lg); }
      .searchbar-card .btn { width: 100%; }
    }
  
