/* IndonesiaInside global design system */
:root {
  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Brand */
  --color-brand: #b5121b;
  --color-brand-hover: #981018;
  --color-primary: var(--color-brand);
  --color-primary-hover: var(--color-brand-hover);

  /* Narasi sidebar identity */
  --color-narasi-surface: #fff9f5;
  --color-narasi-border: #e7e1df;


  /* Text */
  --color-heading: #1a1a1a;
  --color-text: #333333;
  --color-text-soft: #5f6368;
  --color-muted: #767676;

  /* Surfaces */
  --color-bg: #ffffff;
  --color-surface: #f7f7f8;
  --color-surface-warm: #fff9f5;
  --color-surface-gray: #eeeeef;
  --color-headline-surface: #e9e9ea;
  --color-headline-separator: #d2d2d5;

  /* Borders */
  --color-separator: #eeeeee;
  --color-card-border: #e5e5e5;
  --color-input-border: #dddddd;

  /* Footer */
  --color-footer: var(--color-surface-gray);
  --color-footer-text: #1a1a1a;
  --color-footer-muted: #686868;
  --color-footer-border: #d4d5d7;
  --color-footer-hover: var(--color-primary);

  /* Gradients */
  --gradient-nav: linear-gradient(90deg, #a90f18 0%, #b5121b 48%, #c92727 100%);

  /* Typography */
  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --text-sm: 13px;
  --text-base: 16px;
  --text-article: 16px;
  --text-h4: 18px;
  --text-h3: 20px;
  --text-h2: 24px;
  --text-h1: 34px;
  --text-section: 20px;
  --text-headline: 28px;

  /* Layout */
  --container-max: 1140px;
  --sidebar-width: 336px;
  --layout-gap: 28px;
  --article-width: 720px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  /* Spacing */
  --space-8: 40px;

  --transition-fast: 160ms ease;

  /* Updated by navigation.js when the WordPress Admin Bar is visible. */
  --ii-admin-bar-offset: 0px;
  --ii-mobile-header-height: 58px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--font-regular);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
body.ii-menu-open { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--color-primary); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
::selection { background: var(--color-primary); color: #fff; }
::-moz-selection { background: var(--color-primary); color: #fff; }

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  color: var(--color-heading);
  font-family: var(--font-sans);
  text-wrap: balance;
  overflow-wrap: anywhere;
}
h1 { font-size: clamp(28px, 3vw, var(--text-h1)); line-height: 1.16; font-weight: var(--font-bold); letter-spacing: -.02em; }
h2 { font-size: clamp(21px, 2vw, var(--text-h2)); line-height: 1.28; font-weight: var(--font-bold); letter-spacing: -.01em; }
h3 { font-size: clamp(18px, 1.6vw, var(--text-h3)); line-height: 1.32; font-weight: var(--font-semibold); letter-spacing: -.006em; }
h4 { font-size: var(--text-h4); line-height: 1.35; font-weight: var(--font-semibold); }
h5, h6 { font-size: var(--text-base); line-height: 1.4; font-weight: var(--font-semibold); }
p { margin: 0 0 1.2em; }
small { font-size: var(--text-sm); }
strong, b { font-weight: var(--font-bold); }

/* Buttons */
.button,
.wp-element-button,
button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: var(--font-semibold);
  line-height: 1;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}
.button--primary,
.wp-element-button,
button[type="submit"] {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
.button--primary:hover,
.wp-element-button:hover,
button[type="submit"]:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  color: #fff;
}
.button--outline {
  background: transparent;
  border-color: var(--color-brand);
  color: var(--color-brand);
}
.button--outline:hover,
.button--outline:focus-visible {
  background: var(--color-brand);
  border-color: var(--color-brand);
  color: #fff;
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="password"],
input[type="number"],
textarea,
select {
  width: 100%;
  border: 1px solid var(--color-input-border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--color-text);
}
input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="password"],
input[type="number"],
select { min-height: 40px; padding: 8px 12px; }
textarea { min-height: 120px; padding: 10px 12px; resize: vertical; }
input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus,
input[type="text"]:focus-visible,
input[type="email"]:focus-visible,
input[type="url"]:focus-visible,
input[type="search"]:focus-visible,
input[type="password"]:focus-visible,
input[type="number"]:focus-visible,
textarea:focus-visible,
select:focus-visible {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: none;
}
::placeholder { color: #999; }

/* Long-form content */
.article-content,
.prose {
  color: var(--color-text);
  overflow-wrap: break-word;
}
.article-content a,
.prose a { overflow-wrap: anywhere; }
.article-content pre,
.prose pre {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  white-space: pre;
}
.article-content iframe,
.article-content embed,
.article-content object,
.article-content video,
.prose iframe,
.prose embed,
.prose object,
.prose video { max-width: 100%; }
.article-content ul,
.article-content ol,
.prose ul,
.prose ol {
  margin: 18px 0;
  padding-left: 1.45em;
}
.article-content li,
.prose li { margin: 7px 0; }
.article-content li::marker,
.prose li::marker { color: currentColor; }
.article-content table,
.prose table {
  width: 100%;
  margin: 20px 0;
  border-collapse: collapse;
  font-size: 14.5px;
}
.article-content th,
.article-content td,
.prose th,
.prose td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--color-separator);
  text-align: left;
  vertical-align: top;
}
.article-content th,
.prose th {
  background: var(--color-surface);
  color: var(--color-heading);
  font-weight: var(--font-semibold);
}
.article-content .wp-block-table,
.prose .wp-block-table {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.screen-reader-text:focus,
.skip-link:focus {
  clip: auto !important;
  width: auto;
  height: auto;
  margin: 8px;
  padding: 10px 14px;
  background: #fff;
  color: var(--color-heading);
  z-index: 9999;
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-sm);
}
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.ii-icon { width: 1.25em; height: 1.25em; flex: 0 0 auto; }

@media (max-width: 767px) {
  :root { --text-article: 16px; }
  body { line-height: 1.62; }
  .article-content .wp-block-table table,
  .prose .wp-block-table table {
    width: max-content;
    min-width: 100%;
  }
  .article-content table:not(.wp-block-table table),
  .prose table:not(.wp-block-table table) {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .article-content th,
  .article-content td,
  .prose th,
  .prose td {
    padding: 7px 8px;
    white-space: nowrap;
  }
}

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