/* bestaiseo.courses - Modern ChatGPT Light Interface (White Sidebar, Clean Minimalist UI) */

:root {
  --rail: #F9F9FB;
  --rail-ink: #171717;
  --rail-ink2: #676767;
  --rail-line: #E5E5E5;
  --rail-active: #ECECF1;
  --rail-hover: #F0F0F4;
  --rail-hot: #2563EB;

  --ground: #FFFFFF;
  --surface: #FFFFFF;
  --surface-hover: #F7F7F8;
  --sunk: #F7F7F8;

  --ink: #0D0D0D;
  --ink2: #5D5D5D;
  --ink3: #8E8E93;
  --rule: #E5E5E5;

  --blaze: #2563EB;
  --blaze-hover: #1D4ED8;
  --tan: #D97706;
  --deep: #0284C7;

  --good: #059669;
  --warn: #D97706;
  --alert: #DC2626;

  --railw: 270px;
  --col: 860px;
  --dock-h: 84px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  height: 100%;
}

body {
  background: var(--ground);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

button, input, select {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--blaze);
  outline-offset: 2px;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 200;
  background: var(--surface);
  color: var(--ink);
  padding: 10px 14px;
  border: 1px solid var(--rule);
}

.skip:focus {
  left: 8px;
  top: 8px;
}

/* ---------------- Layout Shell ---------------- */
.shell {
  display: flex;
  min-height: 100vh;
}

.rail {
  width: var(--railw);
  flex: 0 0 var(--railw);
  background: var(--rail);
  color: var(--rail-ink);
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px);
  z-index: 60;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-right: 1px solid var(--rail-line);
}

.main {
  flex: 1 1 auto;
  margin-left: var(--railw);
  min-width: 0;
  display: flex;
  justify-content: center;
  padding: 28px 32px calc(var(--dock-h) + 40px);
}

.col {
  width: 100%;
  max-width: var(--col);
  min-width: 0;
}

/* ---------------- Sidebar Rail (ChatGPT White Style) ---------------- */
.brand {
  display: flex;
  align-items: center;
  padding: 16px 14px;
  border-bottom: 1px solid var(--rail-line);
}

.brand-link {
  display: block;
  text-decoration: none;
  width: 100%;
}

.brand-img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  object-fit: contain;
}

.brand b {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--rail-ink);
}

.brand span {
  font-size: 11px;
  font-weight: 600;
  color: var(--rail-ink2);
  background: var(--rail-active);
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

.navsec {
  padding: 14px 12px;
  border-bottom: 1px solid var(--rail-line);
}

.navsec > h2 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rail-ink2);
  margin: 0 0 8px;
  padding-inline: 8px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--rail-ink);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}

.nav a:hover {
  background: var(--rail-hover);
  color: var(--rail-ink);
}

.nav a[aria-current="page"] {
  background: var(--rail-active);
  color: var(--rail-ink);
  font-weight: 600;
}

.nav a em {
  font-style: normal;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--rail-ink2);
  background: #FFFFFF;
  border: 1px solid var(--rail-line);
  padding: 1px 7px;
  border-radius: 10px;
  font-variant-numeric: tabular-nums;
}

.ctl {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ctl label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ctl label > span {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--rail-ink2);
  padding-left: 2px;
}

.ctl select {
  background: #FFFFFF;
  color: var(--rail-ink);
  border: 1px solid var(--rail-line);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
  width: 100%;
  cursor: pointer;
  transition: border-color 0.15s;
}

.ctl select:hover {
  border-color: var(--blaze);
}

.railbtn {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blaze);
  background: none;
  border: 0;
  padding: 6px 2px;
  cursor: pointer;
  text-align: left;
}

.railbtn:hover {
  text-decoration: underline;
}

.railfoot {
  margin-top: auto;
  padding: 16px 18px calc(16px + env(safe-area-inset-bottom, 0px));
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--rail-ink2);
  border-top: 1px solid var(--rail-line);
}

.railfoot b {
  color: var(--rail-ink);
  font-weight: 600;
}

/* Mobile Rail Drawer */
.railtog {
  display: none;
}

.scrim {
  display: none;
}

/* ---------------- ChatGPT Fixed Bottom Dock ---------------- */
.dock {
  position: fixed;
  left: var(--railw);
  right: 0;
  bottom: 0;
  z-index: 50;
  padding: 14px 24px calc(16px + env(safe-area-inset-bottom, 0px));
  background: var(--ground);
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: center;
}

.dockin {
  width: 100%;
  max-width: var(--col);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pill {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 26px;
  padding: 6px 8px 6px 18px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.pill:focus-within {
  border-color: var(--blaze);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.12);
}

.pill > svg {
  flex: 0 0 auto;
  color: var(--ink3);
  transition: color 0.15s;
}

.pill:focus-within > svg {
  color: var(--blaze);
}

.pill input {
  flex: 1 1 auto;
  min-width: 0;
  background: none;
  border: 0;
  outline: none;
  font-size: 15px;
  padding: 8px 0;
  color: var(--ink);
}

.pill input::placeholder {
  color: var(--ink3);
}

.pill .go {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  border-radius: 20px;
  border: 0;
  cursor: pointer;
  background: var(--blaze);
  color: #FFFFFF;
  font-size: 13.5px;
  font-weight: 600;
  transition: background 0.15s;
}

.pill .go svg {
  color: #FFFFFF;
}

.pill .go:hover {
  background: var(--blaze-hover);
}

.dockhint {
  font-size: 12px;
  color: var(--ink3);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  padding-inline: 10px;
}

.dockhint a, .dockhint button {
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--ink2);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
}

.dockhint a:hover, .dockhint button:hover {
  color: var(--blaze);
  border-bottom-color: var(--blaze);
}

/* ---------------- Main Content ---------------- */
.hero {
  margin: 0 0 24px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 32px 32px 28px;
}

.heroin {
  max-width: 100%;
}

h1.t {
  font-weight: 700;
  letter-spacing: -0.025em;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.18;
  margin: 0;
  color: var(--ink);
}

.lede {
  font-size: 17px;
  color: var(--ink2);
  margin: 12px 0 0;
  max-width: 65ch;
  line-height: 1.6;
}

.kv {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 20px 0 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink2);
  border-top: 1px solid var(--rule);
  padding-top: 16px;
}

.kv b {
  color: var(--ink);
  font-weight: 700;
}

/* Toolbar & Sorting */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0 16px;
  border-bottom: 1px solid var(--rule);
}

.count {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink2);
}

.sorter {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink3);
}

.sorter select {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13.5px;
  color: var(--ink);
  cursor: pointer;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0 4px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--sunk);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink2);
}

.chip button {
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--ink3);
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
}

.chip button:hover {
  color: var(--alert);
}

/* ---------------- Course Card Listing Rows ---------------- */
.rows {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 130px;
  gap: 16px;
  align-items: start;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.row:hover {
  border-color: #D1D5DB;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.rk {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink3);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  padding-top: 2px;
}

.row[data-pick="1"] {
  border: 1px solid var(--rule);
}

.row[data-pick="1"] .rk {
  color: var(--blaze);
}

.rname {
  font-weight: 700;
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -0.015em;
  margin: 0;
}

.rname a {
  text-decoration: none;
  color: var(--ink);
  transition: color 0.15s;
}

.rname a:hover, .rname a:focus-visible {
  color: var(--blaze);
  outline: none;
}

.rprov {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink3);
  margin: 4px 0 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rone {
  margin: 10px 0 0;
  color: var(--ink2);
  font-size: 15.5px;
  line-height: 1.55;
}

.rtags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.tag {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink2);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 2px 8px;
  background: var(--ground);
}

.tag[data-k="free"] {
  color: var(--good);
  border-color: var(--good);
  background: transparent;
}

.tag[data-k="lvl"] {
  color: var(--deep);
  border-color: var(--deep);
  background: transparent;
}

.rside {
  text-align: right;
}

.rprice {
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  color: var(--ink);
}

.rscore {
  margin-top: 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink3);
}

.rscore b {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0;
  display: block;
  margin-bottom: 1px;
  font-variant-numeric: tabular-nums;
}

.pickband {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #FFFFFF;
  background: var(--blaze);
  padding: 3px 10px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.flagline {
  font-size: 13.5px;
  line-height: 1.55;
  margin: 12px 0 0;
  padding: 12px 16px;
  border: 1px solid var(--rule);
  background: var(--sunk);
  color: var(--ink2);
  border-radius: 8px;
}

.empty {
  padding: 48px 0;
  text-align: center;
  color: var(--ink2);
  font-size: 16px;
}

/* ---------------- Review View ---------------- */
.crumb {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink3);
  padding: 12px 0 0;
  margin-bottom: 16px;
}

.crumb a {
  color: var(--ink2);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}

.crumb a:hover {
  color: var(--blaze);
  border-bottom-color: var(--blaze);
}

.rvhead {
  padding: 0 0 24px;
  border-bottom: 1px solid var(--rule);
}

h1.rvt {
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.15;
  margin: 10px 0 0;
  color: var(--ink);
}

.rvprov {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink3);
  margin: 10px 0 0;
}

.verdict {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 22px 24px;
  margin: 24px 0 0;
}

.verdict h2 {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink3);
  margin: 0 0 8px;
}

.verdict p {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.6;
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 8px;
  margin: 24px 0 0;
  overflow: hidden;
}

.fact {
  background: var(--surface);
  padding: 12px 14px;
}

.fact dt {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink3);
  margin: 0 0 4px;
}

.fact dd {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

h2.s {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 36px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}

h3.s3 {
  font-size: 16px;
  font-weight: 600;
  margin: 20px 0 0;
}

.prose {
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink);
}

.prose p {
  margin: 14px 0 0;
}

.twocol {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 16px;
}

.lst {
  margin: 10px 0 0;
  padding-left: 20px;
}

.lst li {
  margin-bottom: 8px;
}

.mod {
  border: 1px solid var(--rule);
  background: var(--surface);
  border-radius: 8px;
  margin-top: 10px;
  overflow: hidden;
}

.mod > summary {
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 15px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  user-select: none;
}

.mod > summary::-webkit-details-marker {
  display: none;
}

.mod > summary::after {
  content: "+";
  font-weight: 700;
  font-size: 16px;
  color: var(--ink3);
  flex-shrink: 0;
}

.mod[open] > summary::after {
  content: "−";
}

.mod > summary:hover {
  background: var(--sunk);
}

.mod ol {
  margin: 0;
  padding: 12px 20px 16px 36px;
  font-size: 15px;
  color: var(--ink2);
  border-top: 1px solid var(--rule);
  background: var(--ground);
}

.mod ol li {
  margin-bottom: 6px;
}
.mod ol li:last-child {
  margin-bottom: 0;
}

.mod-item {
  padding: 14px 16px;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 8px;
  margin-top: 10px;
}

.rub {
  margin-top: 18px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
}

.rubrow {
  display: grid;
  grid-template-columns: 160px 1fr 48px;
  gap: 14px;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
}

.rubrow:last-child {
  border-bottom: 0;
}

.rubrow > span:first-child {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink2);
}

.bar {
  height: 8px;
  background: var(--sunk);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.bar i {
  display: block;
  height: 100%;
  background: var(--blaze);
  border-radius: 4px;
}

.rubrow > b {
  font-size: 14.5px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.rubfoot {
  padding: 12px 16px;
  font-size: 12.5px;
  color: var(--ink2);
  background: var(--sunk);
  border-top: 1px solid var(--rule);
}

.srcs {
  margin: 14px 0 0;
  padding-left: 20px;
  font-size: 15px;
  color: var(--ink2);
}

.srcs li {
  margin-bottom: 8px;
}

.srcs a {
  color: var(--blaze);
  word-break: break-word;
}

.alts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.alt {
  border: 1px solid var(--rule);
  background: var(--surface);
  border-radius: 8px;
  padding: 16px;
}

.alt b {
  display: block;
  font-size: 15.5px;
  line-height: 1.35;
  margin-bottom: 6px;
}

.alt b a {
  text-decoration: none;
  color: var(--ink);
}

.alt b a:hover {
  color: var(--blaze);
}

.alt span {
  font-size: 12.5px;
  color: var(--ink3);
  display: block;
}

.visit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  background: var(--blaze);
  color: #FFFFFF;
  padding: 10px 18px;
  border-radius: 6px;
  transition: background 0.15s;
}

.visit:hover {
  background: var(--blaze-hover);
}

.pagefoot {
  margin-top: 40px;
  padding: 20px 0 0;
  border-top: 1px solid var(--rule);
  font-size: 13px;
  color: var(--ink3);
  line-height: 1.6;
}

/* ---------------- Static Pages ---------------- */
.doc {
  padding-bottom: 24px;
}

.doc h2.s:first-of-type {
  border-top: 0;
  padding-top: 0;
  margin-top: 24px;
}

.doc ol, .doc ul {
  padding-left: 22px;
}

.doc li {
  margin-bottom: 8px;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 15px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
}

.doc th, .doc td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

.doc th {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink3);
  background: var(--sunk);
}

.brand a {
  text-decoration: none;
  color: inherit;
}

.rows .row[hidden] {
  display: none !important;
}

/* ---------------- Responsive Styles ---------------- */
.mobhead {
  display: none;
}

@media (max-width: 980px) {
  :root {
    --railw: 0px;
  }
  .mobhead {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--surface);
    border-bottom: 1px solid var(--rule);
    z-index: 70;
    padding: 0 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  }
  .railtog {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: transparent;
    border: 0;
    color: var(--ink);
    cursor: pointer;
    border-radius: 8px;
    padding: 0;
  }
  .railtog:hover {
    background: var(--sunk);
  }
  .moblogo {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
  }
  .moblogo img {
    height: 46px;
    width: auto;
    max-width: 250px;
    object-fit: contain;
    display: block;
  }
  .rail {
    transform: translateX(-280px);
    width: 280px;
    flex-basis: 280px;
    transition: transform 0.2s ease;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
    z-index: 100;
  }
  .rail[data-open="1"] {
    transform: translateX(0);
  }
  .main {
    margin-left: 0;
    padding-inline: 16px;
    padding-top: 84px;
  }
  .dock {
    left: 0;
  }
  .scrim[data-open="1"] {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 90;
  }
  .crumb {
    padding-top: 0;
  }
}

@media (max-width: 640px) {
  .row {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    padding: 16px;
  }
  .rside {
    grid-column: 2;
    text-align: left;
    padding-top: 10px;
    display: flex;
    gap: 20px;
    align-items: baseline;
  }
  .rscore {
    margin-top: 0;
  }
  .rubrow {
    grid-template-columns: 110px 1fr 40px;
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
