/* northcontext — HN-inspired stylesheet
   Verdana, off-white background, orange header, tight spacing.
   Deliberately minimal: no rounded corners, no shadows, no gradients. */

* { box-sizing: border-box; }

body {
  font-family: Verdana, Geneva, sans-serif;
  font-size: 10pt;
  background: #f6f6ef;
  color: #000;
  margin: 0;
  padding: 0;
  line-height: 1.4;
}

/* Header bar */
.header {
  background: #ff6600;
  padding: 2px 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10pt;
}

.header .logo {
  border: 1px solid white;
  padding: 0 4px;
  font-weight: bold;
  background: #ff6600;
  color: white;
  text-decoration: none;
  font-size: 9pt;
}

.header nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.header nav a {
  color: black;
  text-decoration: none;
  padding: 0 2px;
}

.header nav a:hover {
  text-decoration: underline;
}

.header nav a.active {
  font-weight: bold;
}

.header nav .sep { color: black; }

.header .right {
  margin-left: auto;
  font-size: 9pt;
  color: black;
}

.header .right a {
  color: black;
  text-decoration: none;
}

.header .right a:hover {
  text-decoration: underline;
}

/* Demo mode banner */
.demo-banner {
  background: #fffbe5;
  border-bottom: 1px solid #e0d4a0;
  padding: 4px 8px;
  font-size: 9pt;
  color: #6b5d2c;
  text-align: center;
}

.demo-banner a {
  color: #6b5d2c;
  text-decoration: underline;
}

/* Main container */
.container {
  max-width: 960px;
  margin: 0 auto;
  background: #f6f6ef;
  padding: 8px;
}

/* Sub-nav (page tabs) */
.subnav {
  border-bottom: 1px solid #ddd;
  margin-bottom: 12px;
  padding-bottom: 4px;
  font-size: 9pt;
  color: #828282;
}

.subnav strong { color: black; }

/* Typography */
h1 {
  font-size: 13pt;
  font-weight: bold;
  margin: 8px 0 6px 0;
}

h2 {
  font-size: 11pt;
  font-weight: bold;
  margin: 12px 0 4px 0;
}

h3 {
  font-size: 10pt;
  font-weight: bold;
  margin: 10px 0 4px 0;
}

p { margin: 4px 0 8px 0; }

a { color: #000; text-decoration: none; }
a:hover { text-decoration: underline; }
a.muted, .muted { color: #828282; }
a.muted:visited, a:visited { color: #828282; }

.subtext {
  color: #828282;
  font-size: 8pt;
}

/* Item list (HN-style table) */
table.items {
  border-collapse: collapse;
  width: 100%;
}

table.items td {
  vertical-align: top;
  padding: 2px 4px;
}

table.items tr.row {
  border-bottom: 1px dotted #e8e8e2;
}

table.items .rank {
  color: #828282;
  text-align: right;
  width: 28px;
  font-size: 9pt;
}

table.items .meta {
  color: #828282;
  font-size: 8pt;
  margin-top: 1px;
}

table.items .meta a { color: #828282; }
table.items .meta a:hover { text-decoration: underline; color: #828282; }

.tag {
  display: inline-block;
  background: #efefef;
  border: 1px solid #ccc;
  padding: 0 4px;
  font-size: 8pt;
  color: #555;
  margin-right: 3px;
}

.tag.preference { background: #e6f0ff; border-color: #b5d4f4; color: #185fa5; }
.tag.fact       { background: #efeefe; border-color: #cecbf6; color: #3c3489; }
.tag.goal       { background: #faece7; border-color: #f5c4b3; color: #993c1d; }
.tag.event      { background: #e1f5ee; border-color: #9fe1cb; color: #0f6e56; }
.tag.relationship { background: #fbeaf0; border-color: #f4c0d1; color: #993556; }

/* Forms */
form { margin: 6px 0; }

label {
  display: block;
  font-size: 9pt;
  margin-top: 6px;
  margin-bottom: 2px;
  color: #555;
}

input[type=text], input[type=email], input[type=password], input[type=url],
textarea, select {
  font-family: Verdana, Geneva, sans-serif;
  font-size: 10pt;
  border: 1px solid #828282;
  padding: 3px 4px;
  width: 100%;
  max-width: 380px;
  background: white;
}

textarea {
  width: 100%;
  max-width: 100%;
  min-height: 80px;
  font-family: Monaco, Menlo, Consolas, monospace;
  font-size: 9pt;
}

button, input[type=submit] {
  font-family: Verdana, Geneva, sans-serif;
  font-size: 9pt;
  background: #efefef;
  border: 1px solid #828282;
  padding: 3px 10px;
  cursor: pointer;
  color: #000;
}

button:hover, input[type=submit]:hover {
  background: #e0e0e0;
}

button.primary, input[type=submit].primary {
  background: #ff6600;
  border-color: #cc5200;
  color: white;
  font-weight: bold;
}

button.primary:hover {
  background: #e85c00;
}

button.danger {
  background: #fceaea;
  border-color: #e24b4a;
  color: #791f1f;
}

/* Cards / panels */
.panel {
  background: white;
  border: 1px solid #ddd;
  padding: 8px 10px;
  margin: 8px 0;
}

.panel-tight { padding: 4px 8px; }

.kv {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 2px 12px;
  font-size: 9pt;
}

.kv .k { color: #828282; }
.kv .v { color: #000; word-break: break-word; }

/* Stat blocks for dashboard */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin: 8px 0 12px 0;
}

.stat {
  background: white;
  border: 1px solid #ddd;
  padding: 8px;
}

.stat .num {
  font-size: 16pt;
  font-weight: bold;
  color: #ff6600;
  font-family: Verdana, sans-serif;
}

.stat .lbl {
  font-size: 8pt;
  color: #828282;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Code */
code, pre, kbd {
  font-family: Monaco, Menlo, Consolas, monospace;
  font-size: 9pt;
}

code {
  background: #f0f0e8;
  padding: 1px 4px;
  border: 1px solid #e0e0d8;
}

pre {
  background: #f0f0e8;
  border: 1px solid #e0e0d8;
  padding: 8px;
  overflow-x: auto;
  white-space: pre;
  font-size: 9pt;
  line-height: 1.5;
}

pre code { background: none; border: none; padding: 0; }

/* Search bar */
.searchbar {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}

.searchbar input { flex: 1; max-width: none; }

/* Footer */
.footer {
  border-top: 2px solid #ff6600;
  margin-top: 24px;
  padding: 8px 0;
  text-align: center;
  font-size: 8pt;
  color: #828282;
}

.footer a { color: #828282; }

/* Notice / alert */
.notice {
  border: 1px solid #b5d4f4;
  background: #e6f1fb;
  color: #042c53;
  padding: 6px 8px;
  margin: 8px 0;
  font-size: 9pt;
}

.notice.error {
  border-color: #f09595;
  background: #fcebeb;
  color: #501313;
}

.notice.success {
  border-color: #9fe1cb;
  background: #e1f5ee;
  color: #04342c;
}

/* Two-column landing hero */
.hero {
  padding: 16px 0 12px 0;
  border-bottom: 1px solid #ddd;
  margin-bottom: 12px;
}

.hero h1 {
  font-size: 18pt;
  margin: 0 0 6px 0;
}

.hero .tag-line {
  color: #828282;
  font-size: 11pt;
  margin-bottom: 10px;
}

.cols-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .cols-2 { grid-template-columns: 1fr; }
  .header nav { font-size: 9pt; }
  table.items .rank { display: none; }
}

.spacer-sm { height: 6px; }
.spacer    { height: 12px; }

.right { text-align: right; }
.center { text-align: center; }
.mono { font-family: Monaco, Menlo, Consolas, monospace; font-size: 9pt; }
.nowrap { white-space: nowrap; }
.score { color: #ff6600; font-weight: bold; }
