/* EBS SpeakBack microsite - sayagain.robometic.com
   Minimal bilingual one-pager. EN and KO blocks live side-by-side in the
   markup; the active language is set via body[data-lang] and CSS hides the
   inactive one. */

:root {
  --bg: #fafaf7;
  --fg: #1a1a1a;
  --muted: #666;
  --accent: #1f6feb;
  --accent-hover: #1858bf;
  --card: #ffffff;
  --border: #e5e5e0;
  --code-bg: #f0efe8;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo",
               "Noto Sans KR", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* --- Language toggle: hide inactive language blocks --- */
[data-lang="ko"] .lang-en { display: none; }
[data-lang="en"] .lang-ko { display: none; }

/* When a language span is the only inline child, show as inline */
.lang-ko, .lang-en { display: inline; }

/* --- Lock screen --- */
#lock-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.lock-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.lock-card h1 {
  margin: 0 0 .5rem;
  font-size: 1.4rem;
  font-weight: 600;
}
.lock-card .muted {
  font-size: .9rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}
#lock-form {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
#lock-form input[type="password"] {
  padding: .65rem .8rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  outline: none;
}
#lock-form input[type="password"]:focus {
  border-color: var(--accent);
}
#lock-form button {
  padding: .65rem 1rem;
  font-size: 1rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
}
#lock-form button:hover { background: var(--accent-hover); }

#lock-error {
  color: #b91c1c;
  margin-top: .9rem;
  font-size: .85rem;
}

/* --- Main content --- */
main {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 4rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .5rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}
.brand {
  font-weight: 600;
  font-size: 1rem;
}
#lang-toggle {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .35rem .7rem;
  font-size: .85rem;
  cursor: pointer;
  color: var(--fg);
}
#lang-toggle:hover { background: var(--card); }

/* Hero */
.hero h1 {
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 1rem;
}
.lede {
  font-size: 1.05rem;
  color: var(--fg);
  margin: 0 0 1.5rem;
}
.cta {
  display: inline-block;
  padding: .8rem 1.2rem;
  background: var(--accent);
  color: white !important;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: background .15s;
}
.cta:hover { background: var(--accent-hover); }

/* Sections */
section {
  margin-top: 2.5rem;
}
section h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 .9rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: .5rem;
}
section h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: .8rem 0 .4rem;
}

ol, ul {
  padding-left: 1.4rem;
}
ol li, ul li {
  margin-bottom: .35rem;
}

.loop li {
  margin-bottom: .5rem;
}

/* Privacy grid */
.privacy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}
.privacy-grid h3 { margin-top: 0; }
.delete-note {
  margin-top: 1rem;
  padding: .75rem 1rem;
  background: var(--card);
  border-left: 3px solid var(--accent);
  font-size: .95rem;
}

@media (max-width: 540px) {
  .privacy-grid { grid-template-columns: 1fr; }
}

/* Manual: details/summary */
.manual details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .75rem 1rem;
  margin-bottom: .75rem;
}
.manual summary {
  cursor: pointer;
  font-weight: 500;
  padding: .25rem 0;
  outline: none;
}
.manual summary:hover { color: var(--accent); }
.manual details[open] summary {
  margin-bottom: .5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: .5rem;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
}
th, td {
  text-align: left;
  padding: .5rem .6rem;
  border-bottom: 1px solid var(--border);
}
th {
  font-weight: 600;
  background: var(--bg);
}
td code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: .9rem;
  background: var(--code-bg);
  padding: .1rem .35rem;
  border-radius: 4px;
}

/* Inline code + pre blocks */
code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: .92em;
  background: var(--code-bg);
  padding: .08rem .3rem;
  border-radius: 4px;
}
pre {
  background: var(--code-bg);
  padding: .9rem 1rem;
  border-radius: 8px;
  overflow-x: auto;
  font-size: .92rem;
  line-height: 1.5;
}
pre code {
  background: transparent;
  padding: 0;
}

/* Utility */
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* Footer */
footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}
