/* ==========================================================================
   M Bagus R D — Apple HIG redesign
   Light + dark, floating glass nav, soft-elevation cards, pill buttons.
   Loaded after page-level <style> pushes, so it wins the cascade.
   ========================================================================== */

:root {
  color-scheme: light;

  /* Surfaces */
  --bg: #fbfbfd;
  --surface: #f5f5f7;
  --surface-2: #ececef;
  --card-bg: #ffffff;
  --nav-bg: rgba(251, 251, 253, 0.72);
  --overlay: rgba(0, 0, 0, 0.32);

  /* Ink */
  --text: #1d1d1f;
  --text-muted: #6e6e73;
  --text-secondary: #86868b;

  /* Lines */
  --border: rgba(0, 0, 0, 0.10);
  --card-border: rgba(0, 0, 0, 0.07);
  --hairline: rgba(0, 0, 0, 0.06);

  /* Accent */
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-press: #0062c4;
  --accent-light: rgba(0, 113, 227, 0.08);
  --accent-contrast: #ffffff;
  --ring: rgba(0, 113, 227, 0.45);

  /* Status */
  --info: #0071e3;
  --success: #1d9a4b;
  --success-soft: rgba(29, 154, 75, 0.10);
  --destructive: #e30000;
  --destructive-soft: rgba(227, 0, 0, 0.08);
  --warning: #b25000;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 1px 1px rgba(0, 0, 0, 0.03), 0 8px 24px -10px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.04), 0 18px 44px -16px rgba(0, 0, 0, 0.20);
  --shadow-nav: 0 1px 1px rgba(0, 0, 0, 0.03), 0 10px 30px -12px rgba(0, 0, 0, 0.14);
  --shadow-btn: 0 1px 2px rgba(0, 0, 0, 0.08);

  /* Shape */
  --radius: 16px;
  --radius-lg: 22px;
  --radius-sm: 10px;
  --radius-pill: 980px;

  /* Layout */
  --gutter: 24px;
  --content-max: 1068px;
  --nav-height: 56px;
  --nav-offset: 12px;

  /* Motion */
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --transition: 0.24s var(--ease);

  /* Type */
  --font-display: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

[data-theme="dark"] {
  color-scheme: dark;

  --bg: #000000;
  --surface: #1d1d1f;
  --surface-2: #2c2c2e;
  --card-bg: #1c1c1e;
  --nav-bg: rgba(22, 22, 23, 0.72);
  --overlay: rgba(0, 0, 0, 0.6);

  --text: #f5f5f7;
  --text-muted: #a1a1a6;
  --text-secondary: #86868b;

  --border: rgba(255, 255, 255, 0.16);
  --card-border: rgba(255, 255, 255, 0.10);
  --hairline: rgba(255, 255, 255, 0.08);

  --accent: #2997ff;
  --accent-hover: #5aa9ff;
  --accent-press: #0071e3;
  --accent-light: rgba(41, 151, 255, 0.14);
  --accent-contrast: #ffffff;
  --ring: rgba(41, 151, 255, 0.55);

  --success: #30d158;
  --success-soft: rgba(48, 209, 88, 0.14);
  --destructive: #ff453a;
  --destructive-soft: rgba(255, 69, 58, 0.14);
  --warning: #ff9f0a;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 1px 1px rgba(0, 0, 0, 0.4), 0 10px 28px -12px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.5), 0 22px 50px -18px rgba(0, 0, 0, 0.85);
  --shadow-nav: 0 1px 1px rgba(0, 0, 0, 0.4), 0 12px 34px -14px rgba(0, 0, 0, 0.8);
  --shadow-btn: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* ---------------------------------------------------------------- Base -- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-height) + var(--nav-offset) * 2 + 16px);
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  letter-spacing: -0.011em;
  background: var(--bg);
  color: var(--text);
  padding-top: calc(var(--nav-height) + var(--nav-offset) * 2 + 16px);
  overflow-x: hidden;
  transition: background-color var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

main {
  max-width: var(--content-max);
  margin-inline: auto;
  padding: 8px var(--gutter) 80px;
}

img { max-width: 100%; height: auto; display: block; }
svg { display: block; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}
a:hover { color: var(--accent-hover); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.12;
}

p { color: var(--text-muted); }

::selection { background: var(--accent-light); color: var(--text); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
}

/* ----------------------------------------------------------- Utilities -- */
.my-8 { margin-block: 32px; }
.link { color: var(--accent); }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.truncate { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Content shows immediately: Apple-style pages do not fade in on load.
   The class stays in the templates as a no-op hook. */
.fade-in { animation: none; }

/* ---------------------------------------------------------------- Nav -- */
.nav {
  position: fixed;
  top: var(--nav-offset);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 1000px;
  height: var(--nav-height);
  z-index: 1000;
  border-radius: var(--radius-pill);
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-nav);
  transition: background-color var(--transition), border-color var(--transition);
}

.nav-inner {
  height: 100%;
  padding: 0 10px 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}
.nav-logo:hover { color: var(--text); opacity: 0.7; }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }

.nav-links a {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--text-muted);
  transition: color var(--transition), background-color var(--transition);
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links a.active { color: var(--text); background: var(--surface); }

.nav-right { display: flex; align-items: center; gap: 4px; }

.theme-toggle,
.hamburger {
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: color var(--transition), background-color var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.theme-toggle:hover,
.hamburger:hover { color: var(--text); background: var(--surface); }

.theme-toggle svg { width: 17px; height: 17px; fill: currentColor; }
.hamburger { display: none; }
.hamburger svg { width: 19px; height: 19px; fill: currentColor; }

.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

/* ------------------------------------------------------------- Drawer -- */
.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1099;
  background: var(--overlay);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.28s var(--ease);
}
.drawer-overlay.active { display: block; opacity: 1; }

.drawer {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1100;
  width: min(340px, 86vw);
  height: 100%;
  padding: 72px 20px 28px;
  background: var(--bg);
  border-right: 1px solid var(--hairline);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  transform: translateX(-104%);
  transition: transform 0.36s var(--ease-out);
  overflow-y: auto;
}
.drawer.active { transform: none; }

.drawer-close {
  position: absolute;
  top: 18px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.drawer-close svg { width: 16px; height: 16px; fill: currentColor; }

.drawer-nav { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.drawer-nav a {
  display: block;
  padding: 13px 14px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
}
.drawer-nav a:hover { background: var(--surface); }

.drawer-social {
  display: flex;
  gap: 10px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
}
.drawer-social a {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-secondary);
}
.drawer-social a:hover { color: var(--text); }
.drawer-social svg { width: 17px; height: 17px; fill: currentColor; }

/* --------------------------------------------------------------- Hero -- */
.hero { padding: 72px 0 64px; text-align: center; }

.hero-eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--accent);
  margin-bottom: 14px;
}

.hero h1,
.hero-name {
  font-size: clamp(2.5rem, 7vw, 4.25rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-bottom: 14px;
}

.gradient-text {
  background: linear-gradient(120deg, var(--text) 0%, var(--text) 45%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
[data-theme="dark"] .gradient-text {
  background: linear-gradient(120deg, #f5f5f7 0%, #f5f5f7 45%, #2997ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1.0625rem, 2vw, 1.375rem);
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.45;
  max-width: 46ch;
  margin-inline: auto;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

/* ---------------------------------------------------------- Page head -- */
.page-header { padding: 24px 0 8px; text-align: center; }
.page-header h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.035em;
  margin-bottom: 8px;
}
.page-header p {
  color: var(--text-muted);
  font-size: 1.0625rem;
  max-width: 52ch;
  margin-inline: auto;
}

/* ------------------------------------------------------------ Sections -- */
.section { padding: 48px 0; }

.section-title,
section > h2 {
  font-size: clamp(1.625rem, 3.4vw, 2.375rem);
  letter-spacing: -0.032em;
  text-align: center;
  margin-bottom: 10px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.0625rem;
  margin-bottom: 40px;
}

/* ------------------------------------------------------------- Buttons -- */
.btn {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 24px;
  border: 0;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--shadow-btn);
  transition: background-color var(--transition), color var(--transition), transform 0.15s var(--ease), box-shadow var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
}
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-contrast); }
.btn-primary:active { background: var(--accent-press); }

.btn-secondary {
  background: var(--card-bg);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--card-border), var(--shadow-sm);
}
.btn-secondary:hover { background: var(--surface); color: var(--accent-hover); }

.btn-super { height: 52px; padding: 0 30px; font-size: 1.0625rem; }

.btn-arrow { gap: 6px; }
.btn-arrow::after {
  content: "";
  width: 7px;
  height: 7px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
}

/* --------------------------------------------------------- Filter pills -- */
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
}

.filter-pill {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}
.filter-pill:hover { color: var(--text); border-color: var(--text-secondary); }
.filter-pill.active {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}
.filter-pill.active:hover { background: var(--text); color: var(--bg); }

/* -------------------------------------------------------------- Inputs -- */
.search-input,
.models-search {
  width: 100%;
  max-width: 420px;
  height: 44px;
  display: block;
  margin: 0 auto 28px;
  padding: 0 16px 0 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2386868b'%3E%3Cpath d='M15.5 14h-.79l-.28-.27A6.47 6.47 0 0016 9.5 6.5 6.5 0 109.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3C/svg%3E") no-repeat 14px center / 18px 18px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background-color var(--transition);
  -webkit-appearance: none;
}
.search-input::placeholder,
.models-search::placeholder { color: var(--text-secondary); }
.search-input:focus,
.models-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-light);
}

/* --------------------------------------------------------------- Cards -- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), border-color var(--transition);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border);
}

.card-image {
  height: 176px;
  display: grid;
  place-items: center;
  background: var(--surface);
  color: var(--text-secondary);
  border-bottom: 1px solid var(--hairline);
}
.card-image img { width: 100%; height: 100%; object-fit: cover; }

.card-body { display: flex; flex-direction: column; gap: 8px; padding: 22px 22px 24px; }

.card-pill {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 500;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.3;
}
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--accent); }

.card-excerpt {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}
.card-meta span + span::before { content: "·"; margin-right: 10px; color: var(--text-secondary); }

/* ---------------------------------------------------------- Empty state -- */
.empty-state {
  text-align: center;
  padding: 72px 24px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  background: var(--card-bg);
}
.empty-state-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-secondary);
}
.empty-state h3 { font-size: 1.125rem; margin-bottom: 6px; }
.empty-state p { font-size: 0.9375rem; }

/* -------------------------------------------------------------- Article -- */
.article-header { padding: 24px 0 32px; text-align: center; }

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.article-date { color: var(--text-secondary); }

.article-title {
  font-size: clamp(1.875rem, 4.4vw, 2.875rem);
  letter-spacing: -0.035em;
  max-width: 22ch;
  margin: 0 auto;
}

.article-body {
  max-width: 680px;
  margin-inline: auto;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--text);
  letter-spacing: -0.008em;
}
.article-body p { color: var(--text); margin-bottom: 1.35em; }
.article-body h2,
.article-body h3 { color: var(--text); margin: 2em 0 0.6em; }
.article-body h2 { font-size: 1.625rem; }
.article-body h3 { font-size: 1.25rem; }
.article-body ul,
.article-body ol { margin: 0 0 1.35em 1.25em; color: var(--text); }
.article-body li { margin-bottom: 0.4em; }
.article-body a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.article-body pre {
  margin: 1.6em 0;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--card-border);
  background: var(--surface);
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.6;
}
.article-body pre code,
.article-body pre code.hljs {
  padding: 0;
  background: none;
  font-family: var(--font-mono);
  font-size: inherit;
}
.article-body :not(pre) > code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.875em;
}
.article-body img { border-radius: var(--radius); margin: 1.6em 0; }
.article-body blockquote {
  margin: 1.6em 0;
  padding-left: 18px;
  border-left: 3px solid var(--accent);
  color: var(--text-muted);
}

.content-narrow { max-width: 760px; margin-inline: auto; }

.article-footer {
  padding: 8px 0 64px;
  text-align: center;
}

.article-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 14px;
  margin-bottom: 24px;
  text-align: left;
}

.article-nav-link {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  padding: 18px 20px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out),
    border-color var(--transition), background-color var(--transition);
}

.article-nav-link:hover {
  transform: translateY(-2px);
  background: var(--card-bg);
  border-color: var(--border);
  box-shadow: var(--shadow-card);
}

.article-nav-link:active { transform: scale(0.99); }

.article-nav-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-secondary);
}

.article-nav-arrow {
  display: inline-block;
  font-size: 0.875rem;
  line-height: 1;
  color: var(--accent);
  transition: transform 0.25s var(--ease-out);
}

.article-nav-prev:hover .article-nav-arrow { transform: translateX(-2px); }
.article-nav-next:hover .article-nav-arrow { transform: translateX(2px); }

.article-nav-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.35;
  overflow-wrap: break-word;
}

.article-nav-next { text-align: right; }
.article-nav-next .article-nav-label { justify-content: flex-end; }
.article-nav-next .article-nav-title { text-align: right; }

.article-back {
  height: 42px;
  padding: 0 22px;
  font-size: 0.9375rem;
}

@media (max-width: 560px) {
  .article-nav { grid-template-columns: 1fr; }
  .article-nav-link { padding: 16px 18px; }
  .article-nav-next { text-align: left; }
  .article-nav-next .article-nav-label { justify-content: flex-start; }
  .article-nav-next .article-nav-title { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .article-nav-link:hover,
  .article-nav-link:active { transform: none; }
}

/* --------------------------------------------------------------- Forms -- */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 460px;
  margin-inline: auto;
}

.form-group { display: flex; flex-direction: column; gap: 7px; }

.form-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card-bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.4;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
}
.form-input { height: 46px; }
.form-textarea { min-height: 132px; resize: vertical; }
.form-input:focus,
.form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-light);
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-secondary); }

.form-error {
  font-size: 0.8125rem;
  color: var(--destructive);
}

.alert {
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 0.9375rem;
  border: 1px solid transparent;
}
.alert-success { background: var(--success-soft); color: var(--success); border-color: var(--success-soft); }
.alert-error { background: var(--destructive-soft); color: var(--destructive); border-color: var(--destructive-soft); }

/* ----------------------------------------------------------------- CTA -- */
.cta-section { padding: 72px 0; text-align: center; }
.cta-section h2 { margin-bottom: 12px; }
.cta-section p { margin-bottom: 24px; }

/* -------------------------------------------------------- Models table -- */
.models-hero { text-align: center; padding: 24px 0 32px; }
.models-hero h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.035em; margin-bottom: 8px; }
.models-hero p { color: var(--text-muted); font-size: 1.0625rem; max-width: 56ch; margin-inline: auto; }

.models-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.models-meta .models-search { margin: 0; max-width: 340px; }
.models-meta-right { display: flex; align-items: center; gap: 12px; font-size: 0.8125rem; color: var(--text-secondary); }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
  -webkit-overflow-scrolling: touch;
}

table.models { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
table.models th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: var(--surface);
  border-bottom: 1px solid var(--card-border);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
table.models th:hover { color: var(--text); }
table.models th.sorted { color: var(--accent); }
table.models td {
  padding: 12px 16px;
  border-top: 1px solid var(--hairline);
  vertical-align: middle;
}
table.models tbody tr:first-child td { border-top: 0; }
table.models tbody tr:hover td { background: var(--surface); }

.model-name { font-weight: 600; color: var(--text); }
.model-creator { font-size: 0.75rem; color: var(--text-secondary); }
.price { font-variant-numeric: tabular-nums; white-space: nowrap; }
.price-free { color: var(--success); font-weight: 600; }
.price-idr { font-size: 0.75rem; color: var(--text-secondary); font-variant-numeric: tabular-nums; margin-top: 2px; }

.model-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: var(--radius-pill);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.badge-rec { background: var(--accent-light); color: var(--accent); }
.badge-free { background: var(--success-soft); color: var(--success); }

.id-copy {
  cursor: pointer;
  border-bottom: 1px dashed var(--border);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  transition: color var(--transition), border-color var(--transition);
}
.id-copy:hover { color: var(--accent); border-bottom-color: var(--accent); }
.id-copy.copied { color: var(--success); border-bottom-color: var(--success); }

.provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  max-width: 760px;
  margin-inline: auto;
}
.provider-card {
  display: block;
  padding: 26px 24px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  box-shadow: var(--shadow-card);
  color: var(--text);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.provider-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); color: var(--text); }
.provider-card h2 { font-size: 1.25rem; margin-bottom: 6px; }
.provider-card p { font-size: 0.9375rem; color: var(--text-muted); margin: 0; }
.provider-count { display: inline-block; margin-top: 12px; font-size: 0.8125rem; font-weight: 600; color: var(--accent); }

/* ---------------------------------------------------------------- Tools -- */
.tools-hero { text-align: center; padding: 24px 0 32px; }
.tools-hero h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.035em; margin-bottom: 8px; }
.tools-hero p { color: var(--text-muted); font-size: 1.0625rem; max-width: 52ch; margin-inline: auto; }

.tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 24px;
}
@media (min-width: 640px) { .tools-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .tools-grid { grid-template-columns: repeat(3, 1fr); } }

.tool-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  box-shadow: var(--shadow-card);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.tool-card h3 { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.02em; }
.tool-card p { flex: 1; font-size: 0.9375rem; line-height: 1.5; color: var(--text-muted); }
.tool-card .btn { align-self: flex-start; height: 38px; padding: 0 18px; font-size: 0.875rem; }

.tool-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--accent-light);
  color: var(--accent);
}

/* ------------------------------------------------------------ WA tool -- */
.wa-tool { max-width: 560px; margin-inline: auto; }
.wa-tool h1 { font-size: clamp(1.75rem, 4vw, 2.25rem); text-align: center; letter-spacing: -0.03em; margin-bottom: 6px; }
.wa-sub { text-align: center; color: var(--text-muted); font-size: 0.9375rem; margin-bottom: 24px; }

.wa-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 28px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  box-shadow: var(--shadow-card);
}

.wa-field label,
.wa-preview-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
}

.wa-field input {
  width: 100%;
  height: 46px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card-bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.wa-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-light); }

.wa-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: var(--surface);
  font-size: 0.875rem;
  word-break: break-all;
}
.wa-preview .link { font-family: var(--font-mono); font-size: 0.8125rem; }
.wa-preview .btn { height: 34px; padding: 0 14px; font-size: 0.8125rem; white-space: nowrap; box-shadow: none; }

.wa-hint { font-size: 0.8125rem; color: var(--text-secondary); }
.wa-error { min-height: 1.2em; font-size: 0.8125rem; color: var(--destructive); }

/* ------------------------------------------------------------- Adsense -- */
.adsense-wrapper,
.adsense-end-wrap {
  margin: 40px auto;
  padding: 8px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--card-bg);
  overflow: hidden;
}

/* -------------------------------------------------------------- Footer -- */
.footer {
  padding: 40px var(--gutter) 48px;
  border-top: 1px solid var(--hairline);
  background: var(--bg);
}
.footer-inner {
  max-width: var(--content-max);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer-copy { font-size: 0.8125rem; color: var(--text-secondary); }
.footer-social { display: flex; gap: 8px; }
.footer-social a {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--text-secondary);
  background: transparent;
  transition: color var(--transition), background-color var(--transition);
}
.footer-social a:hover { color: var(--text); background: var(--surface); }
.footer-social svg { width: 16px; height: 16px; fill: currentColor; }

/* --------------------------------------------------------- Bottom nav -- */
.bottom-nav {
  display: none;
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 480px;
  height: 58px;
  z-index: 1000;
  border-radius: var(--radius-pill);
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-nav);
}
.bottom-nav-inner { display: flex; align-items: center; height: 100%; padding: 0 6px; }
.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 44px;
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-size: 0.625rem;
  font-weight: 500;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--transition), background-color var(--transition);
}
.bottom-nav-item svg { width: 19px; height: 19px; fill: currentColor; }
.bottom-nav-item.active,
.bottom-nav-item:hover { color: var(--accent); background: var(--accent-light); }

/* ------------------------------------------------------------ Responsive -- */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .hamburger { display: inline-flex; }
  .bottom-nav { display: block; }
  body { padding-bottom: 88px; }
  .hero { padding: 48px 0 40px; }
  .section { padding: 36px 0; }
  .footer { padding-bottom: 96px; }
}

@media (max-width: 480px) {
  :root { --gutter: 18px; }
  body { font-size: 0.9375rem; }
  .nav { width: calc(100% - 24px); }
  .nav-inner { padding: 0 8px 0 18px; }
  .card-body { padding: 18px 18px 20px; }
  .article-body { font-size: 1rem; }
  .page-header { padding-top: 8px; }
}

/* --------------------------------------------------------- Accessibility -- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media print {
  .nav, .bottom-nav, .drawer, .drawer-overlay, .footer-social { display: none !important; }
  body { padding-top: 0; background: #fff; color: #000; }
}
