:root {
  --deep: #082f38;
  --teal: #0d5960;
  --mint: #65c2ad;
  --coral: #e99970;
  --gold: #d7b46a;
  --ink: #17343a;
  --muted: #61777b;
  --paper: #f5f7f3;
  --card: #ffffff;
  --line: #dce5df;
  --shadow: 0 18px 48px rgba(8, 47, 56, 0.1);
  font-family: "Noto Sans Thai", "Leelawadee UI", Tahoma, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body { margin: 0; overflow-x: hidden; background: radial-gradient(circle at 90% 4%, rgba(101, 194, 173, 0.14), transparent 22rem), var(--paper); line-height: 1.65; }
a { color: inherit; }
img { max-width: 100%; }

.guide-header { position: sticky; top: 0; z-index: 20; min-height: 72px; display: flex; align-items: center; gap: 28px; padding: 10px clamp(20px, 5vw, 76px); color: white; background: rgba(8, 47, 56, 0.96); border-bottom: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(16px); }
.guide-brand { display: flex; width: 132px; height: 46px; align-items: center; }
.guide-brand img { width: 100%; max-height: 44px; object-fit: contain; filter: brightness(0) invert(1); }
.guide-header nav { display: flex; gap: 24px; margin-left: auto; }
.guide-header nav a { color: rgba(255,255,255,.78); text-decoration: none; font-size: 14px; }
.guide-header nav a:hover { color: white; }
.header-login { padding: 9px 18px; border: 1px solid rgba(255,255,255,.45); border-radius: 999px; text-decoration: none; font-weight: 700; }

main { max-width: 1480px; margin: auto; padding: 0 clamp(18px, 4vw, 64px) 80px; }
.guide-hero { min-height: 560px; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: clamp(36px, 7vw, 100px); padding: 70px 3vw 48px; }
.eyebrow { margin: 0 0 10px; color: var(--teal); font-size: 12px; font-weight: 900; letter-spacing: .15em; }
.hero-copy h1 { max-width: 730px; margin: 0; color: var(--deep); font-size: clamp(42px, 5.5vw, 78px); line-height: 1.06; letter-spacing: -.04em; }
.hero-copy h1 em { color: var(--teal); font-style: normal; }
.hero-copy > p { max-width: 680px; margin: 24px 0; color: var(--muted); font-size: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.primary-button, .secondary-button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: 10px 22px; border-radius: 10px; font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; }
.primary-button { color: white; background: var(--teal); border: 1px solid var(--teal); box-shadow: 0 10px 24px rgba(13,89,96,.22); }
.secondary-button { color: var(--teal); background: white; border: 1px solid var(--line); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 34px; color: var(--muted); font-size: 13px; }
.hero-meta span { display: grid; }
.hero-meta strong { color: var(--deep); }
.hero-visual { position: relative; min-height: 410px; overflow: hidden; border-radius: 38% 16% 34% 18%; background: radial-gradient(circle at 50% 35%, #1a6970, var(--deep) 68%); box-shadow: 0 30px 70px rgba(8,47,56,.26); }
.hero-visual::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 18% 22%, rgba(255,255,255,.22) 0 4px, transparent 5px), radial-gradient(circle at 78% 68%, rgba(255,255,255,.14) 0 7px, transparent 8px); background-size: 78px 78px, 120px 120px; }
.hero-visual > img { position: absolute; inset: 7% 4%; width: 92%; height: 86%; object-fit: contain; filter: drop-shadow(0 22px 18px rgba(0,0,0,.36)); }
.hero-card { position: absolute; display: grid; padding: 12px 17px; color: white; background: rgba(5,34,40,.74); border: 1px solid rgba(255,255,255,.22); border-radius: 14px; backdrop-filter: blur(12px); }
.hero-card small { color: var(--gold); font-size: 10px; font-weight: 900; letter-spacing: .15em; }
.hero-card--top { top: 24px; right: 22px; }
.hero-card--bottom { bottom: 26px; left: 22px; }

.notice { display: grid; grid-template-columns: 210px 1fr; gap: 24px; padding: 24px 30px; margin: 0 2vw 58px; background: #e9f4ef; border: 1px solid #cae2d7; border-radius: 16px; }
.notice strong { color: var(--teal); }
.notice p { margin: 0; }
.guide-layout { display: grid; grid-template-columns: 240px minmax(0, 920px); justify-content: center; gap: clamp(34px, 5vw, 76px); }
.guide-toc { position: sticky; top: 98px; align-self: start; max-height: calc(100vh - 120px); overflow: auto; padding: 20px; background: rgba(255,255,255,.78); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 30px rgba(8,47,56,.06); }
.guide-toc p { margin: 0 0 12px; color: var(--deep); font-weight: 900; }
.guide-toc a { display: block; padding: 7px 0; color: var(--muted); text-decoration: none; font-size: 13px; border-bottom: 1px solid rgba(220,229,223,.55); }
.guide-toc a:hover { color: var(--teal); }
.guide-content { min-width: 0; }
.guide-layout > *, .guide-section > *, .guide-hero > * { min-width: 0; }
.guide-content { overflow-wrap: anywhere; }
.guide-section { position: relative; display: grid; grid-template-columns: 58px 1fr; gap: 24px; padding: 38px 0; border-bottom: 1px solid var(--line); }
.section-number { display: grid; width: 48px; height: 48px; place-items: center; color: var(--teal); background: white; border: 1px solid var(--line); border-radius: 50%; font-size: 13px; font-weight: 900; box-shadow: 0 5px 14px rgba(8,47,56,.07); }
.guide-section h2 { margin: 0 0 16px; color: var(--deep); font-size: clamp(28px, 3.2vw, 40px); line-height: 1.2; letter-spacing: -.02em; }
.guide-section h3 { margin: 22px 0 8px; color: var(--deep); }
.guide-section p { color: var(--muted); }
.menu-section { margin: 16px 0; padding: 34px 30px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.section-divider { display: flex; align-items: center; gap: 16px; margin: 48px 0 18px; color: var(--teal); font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.section-divider::before, .section-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }

.steps { display: grid; gap: 12px; padding: 0; list-style: none; }
.steps li { display: grid; grid-template-columns: 42px 1fr; gap: 15px; padding: 18px; background: white; border: 1px solid var(--line); border-radius: 14px; }
.steps li > span { display: grid; width: 36px; height: 36px; place-items: center; color: white; background: var(--teal); border-radius: 10px; font-weight: 900; }
.steps p { margin: 4px 0 0; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.feature-grid article { padding: 20px; background: white; border: 1px solid var(--line); border-radius: 14px; }
.feature-grid h3 { margin: 7px 0 4px; }
.feature-grid p { margin: 0; font-size: 14px; }
.feature-grid--compact { grid-template-columns: repeat(2, 1fr); margin-top: 20px; }
.feature-icon { display: grid; width: 36px; height: 36px; place-items: center; color: white; background: var(--teal); border-radius: 10px; }
.workflow-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.workflow-list a { display: flex; gap: 12px; align-items: center; padding: 13px; text-decoration: none; background: white; border: 1px solid var(--line); border-radius: 12px; }
.workflow-list a:hover { border-color: var(--mint); transform: translateY(-1px); }
.workflow-list b { display: grid; min-width: 34px; height: 34px; place-items: center; color: white; background: var(--teal); border-radius: 50%; }
.workflow-list span { display: grid; }
.workflow-list small { color: var(--muted); }
.flow-note { padding: 14px 18px; background: #e9f4ef; border-radius: 12px; }
.how-to { margin: 18px 0; padding: 18px 22px; background: #f6faf7; border-left: 4px solid var(--mint); border-radius: 0 12px 12px 0; }
.how-to h3 { margin-top: 0; }
.how-to li, .number-list li { margin: 8px 0; color: var(--muted); }
.callout { margin: 18px 0 0; padding: 16px 18px; background: #e9f4ef; border: 1px solid #cae2d7; border-radius: 12px; }
.callout--warning { background: #fff5e8; border-color: #f1d5ad; }
.callout p { margin: 4px 0 0; }
.tip { padding: 12px 16px; background: #f7f2e8; border-radius: 10px; }
.check-list { padding: 0; list-style: none; }
.check-list li { position: relative; padding: 6px 0 6px 28px; color: var(--muted); }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--teal); font-weight: 900; }
code { padding: 2px 6px; color: var(--teal); background: #e9f4ef; border-radius: 5px; }

.permission-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; background: white; }
th, td { padding: 13px 15px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; }
th { color: var(--deep); background: #edf4f0; }
tr:last-child td { border-bottom: 0; }
.status { display: inline-block; min-width: 62px; padding: 3px 8px; text-align: center; border-radius: 999px; font-size: 12px; font-weight: 900; }
.status.yes { color: #17634f; background: #dff3e9; }
.status.no { color: #9b443f; background: #fbe5e2; }
details { margin: 10px 0; padding: 15px 18px; background: white; border: 1px solid var(--line); border-radius: 12px; }
summary { color: var(--deep); font-weight: 800; cursor: pointer; }
details p { margin-bottom: 0; }
.guide-footer-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 34px; margin-top: 50px; color: white; background: linear-gradient(135deg, var(--deep), var(--teal)); border-radius: 20px; box-shadow: var(--shadow); }
.guide-footer-card .eyebrow, .guide-footer-card p { color: rgba(255,255,255,.75); }
.guide-footer-card h2 { margin: 0; }
.guide-footer-card .primary-button { color: var(--deep); background: white; border-color: white; white-space: nowrap; }
footer { display: flex; justify-content: space-between; padding: 28px clamp(22px, 6vw, 84px); color: rgba(255,255,255,.7); background: var(--deep); font-size: 13px; }

@media (max-width: 980px) {
  .guide-header nav { display: none; }
  .header-login { margin-left: auto; }
  .guide-hero { grid-template-columns: 1fr; padding-top: 50px; }
  .hero-visual { min-height: 360px; }
  .guide-layout { grid-template-columns: minmax(0, 1fr); }
  .guide-toc { position: static; display: flex; gap: 8px; max-height: none; overflow-x: auto; }
  .guide-toc p { min-width: max-content; margin: 6px 8px 0 0; }
  .guide-toc a { min-width: max-content; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; }
}

@media (max-width: 660px) {
  .guide-header { min-height: 62px; padding: 8px 16px; }
  .guide-brand { width: 112px; }
  .header-login { padding: 7px 13px; font-size: 13px; }
  main { padding-inline: 14px; }
  .guide-hero { padding-inline: 6px; min-height: auto; }
  .hero-copy h1 { font-size: 39px; }
  .hero-visual { min-height: 270px; border-radius: 28px; }
  .notice { grid-template-columns: 1fr; margin-inline: 0; }
  .guide-section, .menu-section { grid-template-columns: 1fr; padding: 28px 20px; }
  .section-number { width: 40px; height: 40px; }
  .feature-grid, .feature-grid--compact, .workflow-list { grid-template-columns: 1fr; }
  .guide-footer-card { align-items: flex-start; flex-direction: column; }
  footer { flex-direction: column; gap: 6px; }
}

@media print {
  @page { size: A4; margin: 14mm; }
  body { background: white; font-size: 10pt; }
  .guide-header, .guide-toc, .hero-actions, footer { display: none !important; }
  main { max-width: none; padding: 0; }
  .guide-hero { min-height: auto; grid-template-columns: 1fr 220px; padding: 0 0 18px; }
  .hero-copy h1 { font-size: 32pt; }
  .hero-visual { min-height: 200px; box-shadow: none; }
  .notice { margin: 0 0 16px; }
  .guide-layout { display: block; }
  .guide-section, .menu-section { break-inside: avoid; padding: 18px 0; margin: 0; border-width: 0 0 1px; border-radius: 0; box-shadow: none; }
  .guide-section h2 { font-size: 20pt; }
  .feature-grid, .workflow-list { grid-template-columns: repeat(2, 1fr); }
  .guide-footer-card { display: none; }
}
