/* ===== IRO Base Reset & Typography — Scheme A ===== */

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

html {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--iro-font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--iro-color-text);
  background: #ffffff;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--iro-color-primary);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
  color: var(--iro-color-ink);
  font-weight: var(--iro-font-weight-bold);
  line-height: 1.2;
}

p, ul, ol, blockquote {
  margin-bottom: 16px;
}

ul, ol { padding-left: 1.5em; }

/* ===== Focus Ring ===== */
:focus-visible {
  outline: 2px solid var(--iro-color-primary);
  outline-offset: 2px;
}

/* ===== Container ===== */
.iro-container {
  max-width: var(--iro-container);
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Base Card ===== */
.iro-card {
  background: var(--iro-color-panel);
  border: 1px solid var(--iro-color-line);
  border-radius: var(--iro-radius-lg);
}

/* ===== Base Panel (no border, light bg) ===== */
.iro-panel {
  background: var(--iro-color-panel);
  border-radius: var(--iro-radius-lg);
  border: 1px solid var(--iro-color-line);
}

/* ===== Richtext ===== */
.iro-richtext h2,
.iro-richtext h3,
.iro-richtext h4 {
  margin-top: 28px;
  margin-bottom: 12px;
  color: var(--iro-color-ink);
}

.iro-richtext p { margin-bottom: 16px; }

.iro-richtext ul,
.iro-richtext ol { margin-bottom: 16px; }

.iro-richtext img {
  margin: 20px 0;
  border-radius: var(--iro-radius-sm);
}

/* ===== Table (engineering spec style) ===== */
.iro-richtext table,
table.iro-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--iro-color-line);
  border-radius: calc(var(--iro-radius-lg) - 2px);
  overflow: hidden;
  margin: 20px 0;
  font-size: 15px;
}

.iro-richtext th,
table.iro-table th {
  background: var(--iro-color-soft-2);
  color: var(--iro-color-ink);
  font-weight: var(--iro-font-weight-semibold);
  text-align: left;
  padding: 12px 14px;
  border-bottom: 2px solid var(--iro-color-line);
}

.iro-richtext td,
table.iro-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--iro-color-line);
  color: var(--iro-color-text);
}

.iro-richtext tr:nth-child(even) td,
table.iro-table tr:nth-child(even) td {
  background: rgba(248, 250, 252, 0.5);
}

.iro-richtext tr:hover td,
table.iro-table tr:hover td {
  background: var(--iro-color-soft-2);
}

/* ===== Inputs ===== */
input[type="text"],
input[type="email"],
input[type="search"],
input[type="tel"],
input[type="url"],
textarea,
select {
  background: #fff;
  border: 1px solid var(--iro-color-line);
  border-radius: var(--iro-radius-md);
  padding: 0 14px;
  min-height: 44px;
  font: inherit;
  font-size: 15px;
  color: var(--iro-color-ink);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--iro-color-primary);
  box-shadow: 0 0 0 3px rgba(11, 30, 63, 0.10);
  outline: none;
}

/* ===== Utility ===== */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
